You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
607 B

  1. #!/bin/bash
  2. # this script should be pasted as post-receive hook in gitea
  3. # and if sphook is not there yet it will download it
  4. # if sphook is already there the script deletes itself
  5. set -e
  6. cd hooks/post-receive.d/
  7. if [ -f "sphook" ]; then
  8. echo "sphook exists. install_sphook.sh will delete itself..."
  9. rm post-receive
  10. echo "install_sphook.sh no more."
  11. else
  12. echo "sphook doesn't exist. let's download it."
  13. wget https://git.sandpoints.org/Drawwell/SandpointsGitHook/raw/branch/master/sphook
  14. chmod +x sphook
  15. echo "sphook downloaded. let's pump some water out of a sandpoint..."
  16. fi