1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-23 09:07:43 +02:00

[task/git-tools] add install and uninstall scripts for hooks

PHPBB3-9769
This commit is contained in:
Igor Wiedler 2010-06-26 13:38:50 +02:00 committed by Chris Smith
parent 6b2f4b6a85
commit 14e5da90c3
2 changed files with 33 additions and 0 deletions
git-tools/hooks

17
git-tools/hooks/install Executable file

@ -0,0 +1,17 @@
#!/bin/sh
#
# Script to install the git hooks
# by symlinking them into the .git/hooks directory
#
# Usage (from within git-tools/hooks):
# ./install
dir=$(dirname $0)
for file in $(ls $dir)
do
if [ $file != "install" ] && [ $file != "uninstall" ]
then
ln -s "../../git-tools/hooks/$file" "$dir/../../.git/hooks/$file"
fi
done

16
git-tools/hooks/uninstall Executable file

@ -0,0 +1,16 @@
#!/bin/sh
#
# Script to uninstall the git hooks
#
# Usage (from within git-tools/hooks):
# ./uninstall
dir=$(dirname $0)
for file in $(ls $dir)
do
if [ $file != "install" ] && [ $file != "uninstall" ]
then
rm -f "$dir/../../.git/hooks/$file"
fi
done