Git Repositories

Add some sanity checks to the git scripts to prevent root user to run it directly.
[simple-git-host.git] / homegit / gitrepo.sh
index fd7e4b3..920a045 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/sh
 # vim: et ai cin sw=2 ts=2 tw=0:
+[ "$HOME" = $(dirname $(readlink -f "$0")) ] || exit 255
 cd ~/
 
 usage() {