Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Warn on .spp files
#!/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
You can’t perform that action at this time.