Permalink
Browse files

simple installer

  • Loading branch information...
1 parent 1814a5b commit 59aa541810aeca4148b6cd06705d3e531c8e572c @progrium committed Jan 1, 2013
Showing with 8 additions and 1 deletion.
  1. +4 −1 gitreceive
  2. +4 −0 installer
View
@@ -14,6 +14,7 @@ case "$1" in
cat > $GITHOME/receiver <<EOF
#!/bin/bash
URL=http://requestb.in/rlh4znrl
+echo "----> Posting to $URL ..."
curl \\
-X 'POST' \\
-F "repository=\$1" \\
@@ -25,6 +26,7 @@ curl \\
EOF
chmod +x $GITHOME/receiver
chown -R $GITUSER $GITHOME
+ echo "Created receiver script in $GITHOME for user '$GITUSER'."
;;
upload-key) # gitreceive upload-key <username>
@@ -33,6 +35,7 @@ EOF
AUTHORIZED_KEYS=$GITHOME/.ssh/authorized_keys
KEY_PREFIX="command=\"$SELF run $2 $FINGERPRINT\",no-agent-forwarding,no-pty,no-user-rc,no-X11-forwarding,no-port-forwarding"
echo "$KEY_PREFIX $KEY" >> $AUTHORIZED_KEYS
+ echo $FINGERPRINT
;;
# Internal commands
@@ -73,7 +76,7 @@ EOF
fi
fi
done
- exit 1 # for debugging
+ #exit 1 # for debugging
;;
*)
View
@@ -0,0 +1,4 @@
+# this is to be used with:
+# curl https://raw.github.com/progrium/gitreceive/master/installer | bash
+curl --silent https://raw.github.com/progrium/gitreceive/master/gitreceive > /usr/local/bin/gitreceive
+chmod +x /usr/local/bin/gitreceive

0 comments on commit 59aa541

Please sign in to comment.