self-destructing install script for gitea
This commit is contained in:
parent
b7a2b2da97
commit
7b913ab8ee
1 changed files with 20 additions and 0 deletions
20
install_sphook.sh
Normal file
20
install_sphook.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# this script should be pasted as post-receive hook in gitea
|
||||||
|
# and if sphook is not there yet it will download it
|
||||||
|
# if sphook is already there the script deletes itself
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd hooks/post-receive.d/
|
||||||
|
|
||||||
|
if [ -f "sphook" ]; then
|
||||||
|
echo "sphook exists. install_sphook.sh will delete itself..."
|
||||||
|
rm post-receive
|
||||||
|
echo "install_sphook.sh no more."
|
||||||
|
else
|
||||||
|
echo "sphook doesn't exist. let's download it."
|
||||||
|
wget https://git.sandpoints.org/Drawwell/SandpointsGitHook/raw/branch/master/sphook
|
||||||
|
chmod +x sphook
|
||||||
|
echo "sphook downloaded. let's pump some water out of a sandpoint..."
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue