metrics.sh 442 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. basedir="$(dirname "$0")"
  3. [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir"
  4. [ $# -ge 1 ] || {
  5. echo "Usage: $0 [CLOC-OPTS] DIRECTORY" >&2
  6. exit 1
  7. }
  8. set -e
  9. cd "$basedir/.."
  10. cloc --exclude-dir="build,dist,.pybuild,release-archives,icons,__pycache__,submodules,awlsim_cython,pyprofibus" \
  11. --read-lang-def="${basedir}/../misc/cloc-lang.txt" \
  12. --exclude-lang='ASP.Net,IDL,D' \
  13. --quiet --progress-rate=0 \
  14. "$@"