find-apps.sh 486 B

1234567891011121314151617181920212223242526
  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. # append emqx application first
  10. echo 'emqx'
  11. find_app 'apps'
  12. if [ -f 'EMQX_ENTERPRISE' ]; then
  13. find_app 'lib-ee'
  14. else
  15. find_app 'lib-ce'
  16. fi
  17. ## find directories in lib-extra
  18. find_app 'lib-extra'
  19. ## find symlinks in lib-extra
  20. find 'lib-extra' -mindepth 1 -maxdepth 1 -type l -exec test -e {} \; -print