[Fai-commit] r3735 - trunk/lib

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Wed Aug 2 13:19:21 UTC 2006


Author: lange
Date: 2006-08-02 13:19:21 +0000 (Wed, 02 Aug 2006)
New Revision: 3735

Modified:
   trunk/lib/get-config-dir-cvs
Log:
rename variables, minor code cleanup


Modified: trunk/lib/get-config-dir-cvs
===================================================================
--- trunk/lib/get-config-dir-cvs	2006-08-02 13:14:29 UTC (rev 3734)
+++ trunk/lib/get-config-dir-cvs	2006-08-02 13:19:21 UTC (rev 3735)
@@ -1,5 +1,7 @@
 #!/bin/bash
+
 # (c) 2002-2006 Henning Glawe <glaweh at physik.fu-berlin.de>
+
 ### BEGIN SUBROUTINE INFO
 # Provides-Var:
 # Requires-Var:    $FAI_CONFIG_SRC $FAI $LOGDIR
@@ -8,34 +10,34 @@
 ### END SUBROUTINE INFO
 
 # matched string: "cvs[+ssh]://user at host/path/to/cvsroot module[=tag]"
-PROTOCOL=$(expr match "$FAI_CONFIG_SRC" '\(.*\)://.*')
-CVS_PATH=$(expr match "$FAI_CONFIG_SRC" '.*://\(\S\+\)\s\+.*')
-CVS_MODULE=$(expr match "$FAI_CONFIG_SRC" '.*://.*\s\+\([^=]*\).*')
-CVS_TAG=$(expr match "$FAI_CONFIG_SRC" '.*=\(.*\)')
+protocol=$(expr match "$FAI_CONFIG_SRC" '\(.*\)://.*')
+dir=$(expr match "$FAI_CONFIG_SRC" '.*://\(\S\+\)\s\+.*')
+module=$(expr match "$FAI_CONFIG_SRC" '.*://.*\s\+\([^=]*\).*')
+tag=$(expr match "$FAI_CONFIG_SRC" '.*=\(.*\)')
 
-case $PROTOCOL in
+case $protocol in
 	cvs+ssh)
 		export CVS_RSH=ssh
-		export CVSROOT=":ext:$CVS_PATH"
+		export CVSROOT=":ext:$dir"
 		;;
 	cvs)
-		export CVSROOT=":pserver:$CVS_PATH"
+		export CVSROOT=":pserver:$dir"
 		;;
 	*)
-		echo "get-config-dir-cvs: protocol $PROTOCOL not implemented"
+		echo "get-config-dir-cvs: protocol $protocol not implemented"
 		exit 1
 		;;
 esac
 		
-[ -n "$CVS_TAG" ] && TAG="-r $CVS_TAG"
+[ -n "tag" ] && tag="-r $tag"
 
 if [ -d "$FAI/CVS" ] ; then
    echo "Updating CVS in $FAI"
    cd $FAI
-   cvs -q up -P $TAG -d -C > $LOGDIR/getconf.log
+   cvs -q up -P $tag -d -C > $LOGDIR/getconf.log
 else 
    echo "Checking out CVS"
    cd $(dirname "$FAI")
    cvs -q co -P -d $(basename "$FAI") \
-     $TAG $CVS_MODULE > $LOGDIR/getconf.log
+     $tag $module > $LOGDIR/getconf.log
 fi




More information about the Fai-commit mailing list