find-apps.sh 443 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. # ensure dir
  4. cd -P -- "$(dirname -- "$0")/.."
  5. find_app() {
  6. local appdir="$1"
  7. find "${appdir}/" -mindepth 1 -maxdepth 1 -type d
  8. }
  9. find_app 'apps'
  10. if [ -f 'EMQX_ENTERPRISE' ]; then
  11. find_app 'lib-ee'
  12. else
  13. find_app 'lib-ce'
  14. fi
  15. ## find directories in lib-extra
  16. find_app 'lib-extra'
  17. ## find symlinks in lib-extra
  18. find 'lib-extra/' -mindepth 1 -maxdepth 1 -type l -exec test -e {} \; -print