Created
October 8, 2018 07:08
-
-
Save johannesberdin/436554f6e89f094b844cea9056e8d8a7 to your computer and use it in GitHub Desktop.
Warn on .spp files
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 | |
LIST=$(git diff --name-only --diff-filter=AM HEAD) | |
for file in $LIST | |
do | |
if [ "$file" == '#' ]; then | |
continue | |
fi | |
EXTENSION=$(echo "$file" | grep ".spp$") | |
if [ "$EXTENSION" != "" ]; then | |
echo "An error occured!" | |
echo | |
echo "You try to commit an .spp file." | |
echo "Please upload the .spp files to the NAS." | |
echo | |
echo "Can't commit, fix errors first." | |
echo | |
exit 1 | |
fi | |
done | |
echo "Commited successfully." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment