find-apps.sh 367 B

123456789101112131415161718192021
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. # ensure dir
  4. cd -P -- "$(dirname -- "$0")/.."
  5. if [ "$(./scripts/get-distro.sh)" = 'windows' ]; then
  6. # Otherwise windows may resolve to find.exe
  7. FIND="/usr/bin/find"
  8. else
  9. FIND='find'
  10. fi
  11. find_app() {
  12. local appdir="$1"
  13. "$FIND" "${appdir}" -mindepth 1 -maxdepth 1 -type d
  14. }
  15. find_app 'apps'
  16. find_app 'lib-ee'