[Fai-commit] r4253 - people/h01ger/softupdate-git-rpm/lib

Holger Levsen h01ger-guest at alioth.debian.org
Wed Apr 11 16:30:54 UTC 2007


Author: h01ger-guest
Date: 2007-04-11 16:30:53 +0000 (Wed, 11 Apr 2007)
New Revision: 4253

Added:
   people/h01ger/softupdate-git-rpm/lib/get-config-dir-git
Log:
hmpf, similar to forgetting to attach the attachment to an email... in r4249 I forgot to commit the actual file...


Added: people/h01ger/softupdate-git-rpm/lib/get-config-dir-git
===================================================================
--- people/h01ger/softupdate-git-rpm/lib/get-config-dir-git	2007-04-11 14:45:08 UTC (rev 4252)
+++ people/h01ger/softupdate-git-rpm/lib/get-config-dir-git	2007-04-11 16:30:53 UTC (rev 4253)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# (c) 2002-2006 Henning Glawe <glaweh at debian.org>
+# (c) 2007 Holger Levsen <holger at layer-acht.org> for the modifications to use git
+
+### BEGIN SUBROUTINE INFO
+# Provides-Var:
+# Requires-Var:    $FAI_CONFIG_SRC $FAI $LOGDIR
+# Suggests-Var:
+# Short-Description: get $FAI from a git repository.
+### END SUBROUTINE INFO
+
+# matched string: "git://user@host/svnpath"
+protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
+gitpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^[:space:]]\+\)')
+
+case $protocol in
+	git)
+		giturl="git://$gitpath"
+		;;
+	git+http)
+		echo git+http
+		giturl="http://$gitpath"
+		;;
+	*)
+		echo "get-config-dir-git: protocol $protocol not implemented"
+		exit 1
+		;;
+esac
+		
+if [ -d "$FAI/.git" ] ; then
+   echo "Updating git copy in $FAI"
+   cd $FAI
+   git pull
+else 
+   echo "Checking out from git"
+   git clone $giturl $FAI 
+fi


Property changes on: people/h01ger/softupdate-git-rpm/lib/get-config-dir-git
___________________________________________________________________
Name: svn:executable
   + *




More information about the Fai-commit mailing list