Skip to content

Instantly share code, notes, and snippets.

@Donmclean
Last active April 25, 2018 09:16
Show Gist options
  • Save Donmclean/06c08571d8d7ebcf7a8678b16d75dd2b to your computer and use it in GitHub Desktop.
Save Donmclean/06c08571d8d7ebcf7a8678b16d75dd2b to your computer and use it in GitHub Desktop.
get total lines of code in repo
### REQUIREMENTS: MUST HAVE cloc INSTALLED!!! -> (brew install cloc)
### USAGE: sh cloc.sh GIT_REPO_URL
#!/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