Commit 7e5d7fac authored by Yuanle Song's avatar Yuanle Song
Browse files

add print-loc.sh

parent 2e6ff9ff
Loading
Loading
Loading
Loading

print-loc.sh

0 → 100755
+14 −0
Original line number Diff line number Diff line
#!/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