Created
September 15, 2017 02:43
-
-
Save walchko/69671eaf3e6a0b95b4f25aabf8a4d38e to your computer and use it in GitHub Desktop.
Count lines of code in a git repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
TMP=/var/tmp/temp-linecount-repo | |
git clone --depth 1 "$1" ${TMP} | |
printf "('${TMP}' will be deleted automatically)\n\n\n" | |
cloc ${TMP} | |
rm -rf ${TMP} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment