]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Set $ME properly.
authorJim Meyering <jim@meyering.net>
Mon, 3 Mar 2003 10:39:02 +0000 (10:39 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 3 Mar 2003 10:39:02 +0000 (10:39 +0000)
tests/misc/tty-eof

index 75a86be06c6639daef942414d3c577881f44e33a..a17b4abf50232e8c2f1cc321c8dd210333a0e0a6 100755 (executable)
@@ -10,6 +10,9 @@ s test"
   ;;
 esac
 
+ARGV_0=$0
+export ARGV_0
+
 exec $PERL -w -- - <<\EOF
 
 # Ensure that cat exits upon a single EOF (^D) from a tty.
@@ -17,7 +20,7 @@ exec $PERL -w -- - <<\EOF
 # requiring no arguments and that write to standard output.
 use strict;
 
-(my $ME = $0) =~ s|.*/||;
+(my $ME = $ENV{ARGV_0}) =~ s|.*/||;
 
 eval { require Expect };
 $@ and (warn "$ME: this script requires Perl's Expect package\n"), exit 77;