[Fai-commit] r3982 - people/eartoast/features/get-config-svn/lib
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Tue Sep 19 14:49:19 UTC 2006
Author: glaweh-guest
Date: 2006-09-19 14:49:19 +0000 (Tue, 19 Sep 2006)
New Revision: 3982
Added:
people/eartoast/features/get-config-svn/lib/get-config-dir-svn
Log:
svnserve implementation
Added: people/eartoast/features/get-config-svn/lib/get-config-dir-svn
===================================================================
--- people/eartoast/features/get-config-svn/lib/get-config-dir-svn (rev 0)
+++ people/eartoast/features/get-config-svn/lib/get-config-dir-svn 2006-09-19 14:49:19 UTC (rev 3982)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# (c) 2002-2006 Henning Glawe <glaweh at debian.org>
+
+### BEGIN SUBROUTINE INFO
+# Provides-Var:
+# Requires-Var: $FAI_CONFIG_SRC $FAI $LOGDIR
+# Suggests-Var:
+# Short-Description: get $FAI from an svn repository.
+### END SUBROUTINE INFO
+
+# matched string: "svn://user@host/svnpath"
+# dir contains user at host/path/to/cvsroot
+protocol=$(expr match "$FAI_CONFIG_SRC" '\([^:]*\)://')
+username=$(expr match "$FAI_CONFIG_SRC" '[^:]*://\([^@]*\)@')
+svnpath=$(expr match "$FAI_CONFIG_SRC" '[^:]*://[^@]\+@\(\S\+\)')
+
+case $protocol in
+ svn)
+ svnurl="svn://$svnpath"
+ ;;
+ *)
+ echo "get-config-dir-cvs: protocol $protocol not implemented"
+ exit 1
+ ;;
+esac
+
+[ -n "$username" ] && user="--username $username"
+
+if [ -d "$FAI/.svn" ] ; then
+ echo "Updating SVN in $FAI"
+ cd $FAI
+ svn -q up $user > $LOGDIR/getconf.log
+else
+ echo "Checking out SVN"
+ svn -q co $user \
+ $svnurl $FAI > $LOGDIR/getconf.log
+fi
Property changes on: people/eartoast/features/get-config-svn/lib/get-config-dir-svn
___________________________________________________________________
Name: svn:executable
+ *
More information about the Fai-commit
mailing list