Skip to content

Instantly share code, notes, and snippets.

@1ncend1ary
Created December 5, 2019 20:06
Show Gist options
  • Save 1ncend1ary/33c1f9678aa2e1cfa0a7dfd759fa5cd0 to your computer and use it in GitHub Desktop.
Save 1ncend1ary/33c1f9678aa2e1cfa0a7dfd759fa5cd0 to your computer and use it in GitHub Desktop.
Count lines of code script
## create file git-cloc with specified contents
brew install cloc
chmod +x git-cloc
mv git-cloc /user/local/bin ## or to your $PATH
#!/usr/bin/env bash
git clone --depth 1 "$1" temp-linecount-repo &&
printf "('temp-linecount-repo' will be deleted automatically)\n\n\n" &&
cloc temp-linecount-repo &&
rm -rf temp-linecount-repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment