sysadmin-bin r87 - trunk
- From: otaylor svn gnome org
- To: svn-commits-list gnome org,gnome-sysadmin gnome org
- Subject: sysadmin-bin r87 - trunk
- Date: Thu, 19 Mar 2009 22:43:16 +0000 (UTC)
Author: otaylor
Date: Thu Mar 19 22:43:16 2009
New Revision: 87
URL: http://svn.gnome.org/viewvc/sysadmin-bin?rev=87&view=rev
Log:
2009-01-14 Owen Taylor <otaylor redhat com>
* run-git-or-special-cmd: Rework to allow the special commands:
create-repository
finish-import
force (for git push --exec=force)
import (for git push --exec=import)
Modified:
trunk/ChangeLog
trunk/run-git-or-special-cmd
Modified: trunk/run-git-or-special-cmd
==============================================================================
--- trunk/run-git-or-special-cmd (original)
+++ trunk/run-git-or-special-cmd Thu Mar 19 22:43:16 2009
@@ -3,28 +3,42 @@
# vim: set ts=4 sw=4:
if [ "$SSH_ORIGINAL_COMMAND" != "" ]; then
- if [ "$SSH_ORIGINAL_COMMAND" != "svnserve -t" ]; then
- case "$SSH_ORIGINAL_COMMAND" in
- "new-git-repos "*)
- echo 'ERROR: new-git-repos: not yet implemented'
- exit 1
- ;;
+ # $SSH_ORIGINAL_COMMAND has quoting; split it apart into arguments
+ eval "set $SSH_ORIGINAL_COMMAND"
+ COMMAND=$1
+ shift
+
+ case "$COMMAND" in
+ create-repository)
+ exec sudo -u gitadmin /home/admin/gitadmin-bin/create-repository "$@"
+ ;;
+
+ finish-import)
+ exec /home/admin/gitadmin-bin/finish-import "$@"
+ ;;
+
+ # These allow 'git push --exec=force/import'
+ force)
+ exec /home/admin/gitadmin-bin/receive-pack-force "$@"
+ ;;
+
+ import)
+ exec /home/admin/gitadmin-bin/receive-pack-import "$@"
+ ;;
# This existed for retrieving mango passwords from svn.gnome.org; if we keep the
# system and repurpose socket for something else we could move the files to
# git.gnome.org, but it's a bit of a wonky system.
-# "mango")
-# cat "/var/local/mango/`whoami`" 2> /dev/null
-# echo > "/var/local/mango/`whoami`" 2> /dev/null
-# exit
-# ;;
- *)
- exec /usr/bin/git-shell -c "$SSH_ORIGINAL_COMMAND"
- ;;
- esac
- fi
+# mango)
+# cat "/var/local/mango/`whoami`" 2> /dev/null
+# echo > "/var/local/mango/`whoami`" 2> /dev/null
+# exit
+# ;;
+ *)
+ exec /usr/bin/git-shell -c "$SSH_ORIGINAL_COMMAND"
+ ;;
+ esac
fi
echo 'ERROR: must specify a command'
exit 1
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]