From: Aleš Křenek Date: Thu, 7 Sep 2006 09:15:16 +0000 (+0000) Subject: implementation of -f file_prefix X-Git-Tag: glite-jp_R_1_3_2~3 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=fa670f54bb966e0d090ceb5440e2c5eaa05e7045;p=jra1mw.git implementation of -f file_prefix --- diff --git a/org.glite.jp/examples/pch06/cheat.pl b/org.glite.jp/examples/pch06/cheat.pl index 1d1fa9a..f917cbf 100644 --- a/org.glite.jp/examples/pch06/cheat.pl +++ b/org.glite.jp/examples/pch06/cheat.pl @@ -2,14 +2,15 @@ use Getopt::Std; -getopt('g:s:'); +getopt('g:s:f:'); $glite = $opt_g ? $opt_g : "$ENV{HOME}/glite/stage"; $dagids = "$glite/examples/glite-lb-dagids"; $regjob = "$glite/examples/glite-lb-job_reg"; $logevent = "$glite/bin/glite-lb-logevent -I"; -die "usage: $0 -s bkserver [ -g glite_install_dir ] dump \n" unless $opt_s && $#ARGV == 0; +die "usage: $0 -s bkserver -f file_prefix [ -g glite_install_dir ] dump \n" unless $opt_s && $opt_f && $#ARGV == 0; $server = $opt_s; +$fprefix = $opt_f; %omap = ( @@ -147,7 +148,16 @@ sub logit { $k =~ /^DG\.([A-Z]+)\.([A-Z_]+)$/; die "$k: unexpected in $ev\n" unless $1 eq uc $ev; push @opt,'--'.lc $2; - push @opt,"'$_->{$k}'"; + if ($ev eq 'UserTag' && $2 eq 'VALUE' && + ($_->{'DG.USERTAG.NAME'} eq 'ipaw_input' || $_->{'DG.USERTAG.NAME'} eq 'ipaw_output') + ) { + my $val = $_->{$k}; + $val =~ s|.*/|$fprefix|; + push @opt,"'$val'"; + } + else { + push @opt,"'$_->{$k}'"; + } } }