CVSROOT: namecheck.sh - only create dir if it's not there

baggins baggins at pld-linux.org
Wed May 16 16:35:36 CEST 2007


Author: baggins                      Date: Wed May 16 14:35:36 2007 GMT
Module: CVSROOT                       Tag: HEAD
---- Log message:
- only create dir if it's not there

---- Files affected:
CVSROOT:
   namecheck.sh (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: CVSROOT/namecheck.sh
diff -u CVSROOT/namecheck.sh:1.9 CVSROOT/namecheck.sh:1.10
--- CVSROOT/namecheck.sh:1.9	Wed May 16 16:32:06 2007
+++ CVSROOT/namecheck.sh	Wed May 16 16:35:31 2007
@@ -16,7 +16,7 @@
 	if [ "$module" == "SPECS" ]; then
 		pkgname=${file%.spec}
 		if [ "${pkgname}.spec" = "$file" ] ;then
-			mkdir $CVSROOT/packages/$pkgname
+			[ -d $CVSROOT/packages/$pkgname ] || mkdir $CVSROOT/packages/$pkgname
 		else
 			echo "Warning: File '$file' is not a spec file, it shouldn't be in SPECS module!"
 		fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/CVSROOT/namecheck.sh?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list