find-props.sh 411 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. ## this script prints out all test/props/prop_*.erl files of a given app,
  3. ## file names are separated by comma for proper's `-m` option
  4. set -euo pipefail
  5. # ensure dir
  6. cd -P -- "$(dirname -- "$0")/.."
  7. BASEDIR="."
  8. if [ "$1" != "emqx" ]; then
  9. BASEDIR="$1"
  10. fi
  11. find "${BASEDIR}/test/props" -name "prop_*.erl" -print0 2>/dev/null | \
  12. xargs -0 -I{} basename {} .erl | xargs | tr ' ' ','