[Fai-commit] r3766 - trunk/lib
fai-commit at lists.alioth.debian.org
fai-commit at lists.alioth.debian.org
Mon Aug 7 10:23:51 UTC 2006
Author: lange
Date: 2006-08-07 10:23:50 +0000 (Mon, 07 Aug 2006)
New Revision: 3766
Modified:
trunk/lib/get-config-dir
trunk/lib/get-config-dir-cvs
Log:
replace .* with [^:] or just remove .* if not needed
Modified: trunk/lib/get-config-dir
===================================================================
--- trunk/lib/get-config-dir 2006-08-06 21:25:13 UTC (rev 3765)
+++ trunk/lib/get-config-dir 2006-08-07 10:23:50 UTC (rev 3766)
@@ -28,7 +28,7 @@
# "nfs://host/path/to/exported/config"
# ^^^
# the "major" protocol name is the one up to the first "+", if it exists
-method=$(expr match "$FAI_CONFIG_SRC" '\([^+]*\).*://.*')
+method=$(expr match "$FAI_CONFIG_SRC" '\([^+]*\).*://')
# run get-config-dir-$method script if it exists
if which get-config-dir-$method &>/dev/null ; then
Modified: trunk/lib/get-config-dir-cvs
===================================================================
--- trunk/lib/get-config-dir-cvs 2006-08-06 21:25:13 UTC (rev 3765)
+++ trunk/lib/get-config-dir-cvs 2006-08-07 10:23:50 UTC (rev 3766)
@@ -11,10 +11,10 @@
# matched string: "cvs[+ssh]://user at host/path/to/cvsroot module[=tag]"
# dir contains user at host/path/to/cvsroot
-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" '.*=\(.*\)')
+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
cvs+ssh)
More information about the Fai-commit
mailing list