From: Ian Jackson Date: Sat, 4 Jul 2009 15:39:21 +0000 (+0100) Subject: show instance in upload emails X-Git-Tag: 1.9.2~39 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=e338055994b1b406741b351644c13e730db74fc8 show instance in upload emails --- 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 $!;