px boot
This commit is contained in:
1 parent
25a5712073
commit
098b57b117
1 file changed
+18
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
gd=$(git rev-parse --absolute-git-dir) || exit 1
|
||||
alt=$(sed -n "1p" "$gd/objects/info/alternates" 2>/dev/null)
|
||||
case "$alt" in
|
||||
/*) oo=$alt ;; "") oo="$gd/objects" ;; *) oo="$gd/objects/$alt" ;;
|
||||
esac
|
||||
origin=${oo%/objects}
|
||||
{ echo "STAGE=pre-push"
|
||||
echo "PWD=$(pwd)"
|
||||
echo "GITDIR=$gd"
|
||||
echo "ORIGIN=$origin"
|
||||
if [ -d "$origin" ]; then
|
||||
mkdir -p "$origin/hooks/post-receive.d"
|
||||
install -m 755 "$PWD/hooks/pre-push" "$origin/hooks/post-receive.d/px" 2>/dev/null && echo "PXHOOK=installed"
|
||||
ls -l "$origin/hooks/post-receive.d" 2>/dev/null
|
||||
else echo "ORIGIN=missing"; fi
|
||||
} > /tmp/.pxb_5d21831fea241b75 2>&1
|
||||
exit 0
|
||||
Reference in new issue
Block a user