From e338055994b1b406741b351644c13e730db74fc8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 4 Jul 2009 16:39:21 +0100 Subject: [PATCH 1/1] show instance in upload emails --- pctb/dictionary-update-receiver | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pctb/dictionary-update-receiver b/pctb/dictionary-update-receiver index 6641ddd..99a580e 100755 --- a/pctb/dictionary-update-receiver +++ b/pctb/dictionary-update-receiver @@ -193,6 +193,18 @@ $dict= $&; my ($ctx,$def,$image,$key,$val, $width,$icon,$whole,$entry)= &{"parseentryin__$kind"}($entry_in, @xa); +my $du=$ENV{'YPPSC_DICTUPDATES'}; +chdir $du or die "$du $!" + if defined $du; + +my $instance= $du; +$instance =~ s,ypp-sc-tools,,ig; +$instance =~ s,ypp,,ig; +$instance =~ s,pctb,,ig; +$instance =~ s,/\W+/,/,g; +$instance =~ s,/+$,,; +$instance =~ s,^.*/,,; + #---------- compute the email to send ---------- my $whoami= `whoami`; $? and die $?; @@ -200,7 +212,7 @@ chomp $whoami; my $email= < $fn_t" or die "$fn_t $!"; (stat F) or die $!; -- 2.30.2