mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
22 lines
590 B
Bash
Executable File
22 lines
590 B
Bash
Executable File
#!/bin/bash
|
|
# Installation: ln -s ../../precommit-hook.sh .git/hooks/pre-commit
|
|
|
|
for directory in patches debian; do
|
|
if git status --porcelain "$directory" | grep "^.[^ ]" &> /dev/null; then
|
|
echo ""
|
|
echo "*** PLEASE ADD OR STASH YOUR CHANGES IN $directory ***"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
git diff --cached --name-status | while read status file; do
|
|
if [[ "$file" =~ ^patches/ ]] || [[ "$file" =~ ^debian/tools/ ]] || [[ "$file" =~ ^debian/changelog ]]; then
|
|
echo ""
|
|
echo "*** UPDATING AUTOGENERATED FILES ***"
|
|
echo ""
|
|
debian/tools/patchupdate.py || exit 1
|
|
break;
|
|
fi
|
|
done
|