From: Zdeněk Šustr Date: Tue, 14 Dec 2010 13:57:22 +0000 (+0000) Subject: Add switches and autodetection to handle org.glite/emi schizophrenia. X-Git-Tag: glite-lb-client-java_R_1_0_5_3~32 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=bb56a7a507daa13051d65ab369436c8bf6a9d2b8;p=jra1mw.git Add switches and autodetection to handle org.glite/emi schizophrenia. --- diff --git a/org.glite.lb/etics-tag.pl b/org.glite.lb/etics-tag.pl index 223acf4..40b4b61 100755 --- a/org.glite.lb/etics-tag.pl +++ b/org.glite.lb/etics-tag.pl @@ -24,7 +24,7 @@ $GLITE_LB_LOCATION="./org.glite.lb"; if ($TMPDIR eq "") {$TMPDIR="/tmp";} -getopts('i:c:m:gh'); +getopts('i:c:m:p:gh'); $module = shift; @@ -38,6 +38,7 @@ usage: $0 [-i maj|min|rev|age|none|] [-g] [-c ] [-g] [-c ] [-g] [-c $TMPDIR/etics-tag-proj_configs.$$.tmp"); + + if ( !system("grep -x \"org.glite.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "org.glite"; } + else { + if ( !system("grep -x \"emi.HEAD\" $TMPDIR/etics-tag-proj_configs.$$.tmp > /dev/null") ) { $project = "emi"; } + else { die "Unable to autodetect project. Run from workspace root or specify by -p" } + } + + system("rm $TMPDIR/etics-tag-proj_configs.$$.tmp"); + } + + if ($project eq "emi") { $proj_opt = " --emi"; } + else { $proj_opt = ""; } + # According to the documentation, symbolic names in the 'cvs log' output are sorted by age so this should be OK #$current_tag=`cvs log -h $module/Makefile | grep \"_R_\" | head -n 1`; #$current_tag=~s/^\s//; @@ -197,6 +217,7 @@ usage: $0 [-i maj|min|rev|age|none|] [-g] [-c ] [-g] [-c ] [-g] [-c