diff options
author | joey <joey> | 1999-08-17 04:58:45 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 04:58:45 +0000 |
commit | ec938d4da786f7fd545b2ca27ebd5ea5c8b45c84 (patch) | |
tree | 3190f8df4b0ffba69ad43a4f03bfa88aa55c6e52 /Dh_Lib.pm | |
parent | 0287a9cbf507569b92fa157fb002a4ead079bbdb (diff) | |
download | debhelper-ec938d4da786f7fd545b2ca27ebd5ea5c8b45c84.tar.gz |
r117: Initial Import
Diffstat (limited to 'Dh_Lib.pm')
-rw-r--r-- | Dh_Lib.pm | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -131,12 +131,11 @@ sub error { my $message=shift; # Output a warning. sub warning { my $message=shift; - print STDERR basename().": $message\n"; + print STDERR basename($0).": $message\n"; } -# Returns the basename of the program. -sub basename { - my $fn=$0; +# Returns the basename of the argument passed to it. +sub basename { my $fn=shift; $fn=~s:.*/(.*?):$1:; return $fn; } @@ -241,7 +240,7 @@ sub autoscript { my $package=shift; my $script=shift; my $filename=shift; my $se } # TODO: do this in perl, perhaps? - complex_doit("echo \"# Automatically added by ".basename().">> $outfile"); + complex_doit("echo \"# Automatically added by ".basename($0).">> $outfile"); complex_doit("sed \"$sed\" $infile >> $outfile"); complex_doit("echo '# End automatically added section' >> $outfile"); } |