mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[task/git-tools] add install and uninstall scripts for hooks
PHPBB3-9769
This commit is contained in:
parent
6b2f4b6a85
commit
14e5da90c3
2 changed files with 33 additions and 0 deletions
17
git-tools/hooks/install
Executable file
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
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
|
Loading…
Add table
Reference in a new issue