diff --git a/print-loc.sh b/print-loc.sh new file mode 100755 index 0000000000000000000000000000000000000000..6e18c4b9699ed8461691c86937381d72fe64e357 --- /dev/null +++ b/print-loc.sh @@ -0,0 +1,14 @@ +#!/bin/sh +print_help_and_exit() { + echo "Usage: ./print-loc" + exit 1 +} + +# main() +if [ "$1" = "--help" ]; then + print_help_and_exit +fi +cloc --exclude-dir vendor . +if [ $? -ne 0 ]; then + echo "Error: require cloc program. Try sudo apt-get install -y cloc" +fi