From 334e60a706d7f46a5e2e3cf98692df6c61ef2ee8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Tue, 16 Mar 2010 14:31:07 +0000 Subject: [PATCH] - Allow HEAD as a branch tag - Do not consider '/' characters in copyright presence checking. --- org.glite.lb/egee_license_check.sh | 10 +++++----- org.glite.lb/etics-tag-branch.pl | 4 +++- org.glite.lb/etics-tag-with-subsystems-branch.pl | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/org.glite.lb/egee_license_check.sh b/org.glite.lb/egee_license_check.sh index f592100..2af801b 100644 --- a/org.glite.lb/egee_license_check.sh +++ b/org.glite.lb/egee_license_check.sh @@ -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 diff --git a/org.glite.lb/etics-tag-branch.pl b/org.glite.lb/etics-tag-branch.pl index 8a599cd..3d2b49d 100644 --- a/org.glite.lb/etics-tag-branch.pl +++ b/org.glite.lb/etics-tag-branch.pl @@ -105,7 +105,9 @@ usage: $0 -b [-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"); + } } diff --git a/org.glite.lb/etics-tag-with-subsystems-branch.pl b/org.glite.lb/etics-tag-with-subsystems-branch.pl index 1a22f3f..6831824 100644 --- a/org.glite.lb/etics-tag-with-subsystems-branch.pl +++ b/org.glite.lb/etics-tag-with-subsystems-branch.pl @@ -104,8 +104,9 @@ usage: $0 -b [-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"); + } } -- 1.8.2.3