Created
May 26, 2019 20:55
-
-
Save DanielJette/e313b32f40428e91c2af4a0bfe761ac2 to your computer and use it in GitHub Desktop.
Simple script to count java and kotlin files in a project
This file contains 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
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Please specify a project" | |
echo " e.g. show_lang.sh Polaris/Core" | |
exit 1 | |
fi | |
BASEDIR=$(dirname "$0") | |
pushd "${BASEDIR}/../$1" > /dev/null 2>&1 | |
cd src > /dev/null 2>&1 | |
JAVA=`find . | grep --color=no "\.java$" | wc -l` | |
echo "" | |
echo "$1:" | |
echo " Java files: $JAVA" | |
KOTLIN=`find . | grep --color=no "\.kt$" | wc -l` | |
echo " Kotlin files: $KOTLIN" | |
popd > /dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment