find-apps.sh 492 B

123456789101112131415161718192021
  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 | grep -vE "emqx_exhook|emqx_exproto|emqx_lwm2m|emqx_sn|emqx_coap|emqx_stomp"
  8. }
  9. find_app 'apps'
  10. if [ -f 'EMQX_ENTERPRISE' ]; then
  11. find_app 'lib-ee'
  12. fi
  13. ## find directories in lib-extra
  14. find_app 'lib-extra'
  15. ## find symlinks in lib-extra
  16. find 'lib-extra' -mindepth 1 -maxdepth 1 -type l -exec test -e {} \; -print