- Allow HEAD as a branch tag
authorZdeněk Šustr <sustr4@cesnet.cz>
Tue, 16 Mar 2010 14:31:07 +0000 (14:31 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Tue, 16 Mar 2010 14:31:07 +0000 (14:31 +0000)
- Do not consider '/' characters in copyright presence checking.

org.glite.lb/egee_license_check.sh
org.glite.lb/etics-tag-branch.pl
org.glite.lb/etics-tag-with-subsystems-branch.pl

index f592100..2af801b 100644 (file)
@@ -92,10 +92,10 @@ file=$1
 
 stripped_contents=`cat ${file} |
 sed --posix --regexp-extended \
-    -e 's:^[[:space:]]*(\#|//|/\*|\*)[[:space:]]*::' \
-    -e 's:[[:space:]]*(\#|//|\*/|\*)[[:space:]]*$::' \
+    -e 's:^[[:space:]]*(\#|//|/\*|\*|\%)[[:space:]]*::' \
+    -e 's:[[:space:]]*(\#|//|\*/|\*|\%)[[:space:]]*$::' \
     -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' |
-tr -d '[[:space:]]'`
+tr -d '[\/[:space:]]'`
 
 # is copyright present?
 echo ${stripped_contents} | grep -q ${stripped_copyright} 2>/dev/null
@@ -229,8 +229,8 @@ limitations under the License.'
 COPYRIGHT='Copyright (c) Members of the EGEE Collaboration. 2004-2010.
 See http://www.eu-egee.org/partners for details on the copyright holders.'
 
-stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[[:space:]]'`
-stripped_license=`printf "$LICENSE" | tr -d '[[:space:]]'`
+stripped_copyright=`printf "$COPYRIGHT" | sed --posix --regexp-extended -e 's/[[:digit:]]{4}( ?[,-] ?[0-9]{4})*//' | tr -d '[\/[:space:]]'`
+stripped_license=`printf "$LICENSE" | tr -d '[\/[:space:]]'`
 
 #ANSI C files
 echo Processing ANSI C files
index 8a599cd..3d2b49d 100644 (file)
@@ -105,7 +105,9 @@ usage: $0 -b <branch> [-c configuration] module.name
                # Make sure the branch exists
                # **********************************
 
-               die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch");
+               if ( $branch ne "HEAD" ) {
+                       die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch");
+               }
 
        }
 
index 1a22f3f..6831824 100644 (file)
@@ -104,8 +104,9 @@ usage: $0 -b <branch> [-c configuration] subsystem.name
                # **********************************
                # Make sure the branch exists
                # **********************************
-
-               die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch");
+               if ( $branch ne "HEAD" ) {
+                       die "Branch $branch does not exist for this module\n" if system("cvs status -v $module/project/version.properties | grep \"(branch:\" | grep -w $branch");
+               }
 
        }