SigScript/scripts/commit.sh

33 lines
654 B
Bash
Raw Permalink Normal View History

#Adds a commit message and pushes project to github repository.
#
source utils/search.sh
find . -type f -name md5 -delete
find . -type f -name filelist -delete
#Generate a new hash for every sub-directory, which may require an update.
2022-05-17 19:51:41 +00:00
FILES=$(cat utils/.updateDirectories)
COMMIT_MESSAGE="$*"
FIRST_LINE=true
while IFS= read -r line
do
if [ "$FIRST_LINE" = true ]; then
COMMIT_MESSAGE+="
Co-authored-by: $line"
FIRST_LINE=false
else
COMMIT_MESSAGE+="
Co-authored-by: $line"
fi
done < utils/.coauthors
for f in $FILES
do
search $f
done
git config --global credential.helper store
git add -u
git add *
git commit -m "$COMMIT_MESSAGE"
git push