d611c88520ad00874f8f7762507077e7ff95bc26 braney Fri Jun 26 12:00:51 2020 -0700 change gitFiles to check to see if git is installed and the current directory is in a repository diff --git src/utils/gitTools/gitFiles src/utils/gitTools/gitFiles index e8ae44c..be8be82 100755 --- src/utils/gitTools/gitFiles +++ src/utils/gitTools/gitFiles @@ -7,16 +7,26 @@ Options: -h or -help - print this message' while [[ $1 == -* ]] ; do opt=$1 shift case "$opt" in -h) echo "$usage" 1>&2 exit 1 ;; *) echo "Error: invalid option: $opt" 1>&2 echo "$usage" 1>&2 exit 1 ;; esac done +if git --version > /dev/null 2>&1 +then + if git rev-parse --git-dir > /dev/null 2>&1 + then git ls-tree -r --name-only HEAD "$@" + else + find "$@" + fi +else + find "$@" +fi