From fa670f54bb966e0d090ceb5440e2c5eaa05e7045 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Thu, 7 Sep 2006 09:15:16 +0000 Subject: [PATCH] implementation of -f file_prefix --- org.glite.jp/examples/pch06/cheat.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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}'"; + } } } -- 1.8.2.3