X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=pctb%2Fdictionary-update-receiver;h=99a580e46888280c1c589a442edff38c6ea662cc;hp=6641dddf9de1f51c504c7fa1f1a3fd268704909c;hb=e338055994b1b406741b351644c13e730db74fc8;hpb=e46a25ff6f743a98282a391eba00443b6d2742fa 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 $!;