From a8905acdaf5535bfe099c720ba37670f7a7238ab Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Mon, 17 Apr 2000 16:27:51 +0000 Subject: [PATCH] Borland build file from Bob Soliday. --- src/tools/fullName.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/tools/fullName.pl diff --git a/src/tools/fullName.pl b/src/tools/fullName.pl new file mode 100755 index 000000000..e2b154f39 --- /dev/null +++ b/src/tools/fullName.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +use Cwd; +use File::Basename; + +sub Usage +{ + my ($txt) = @_; + + print "\nError: $txt\n" if $txt; + + exit 2; +} + +# need at least one args: ARGV[0] +Usage("need more args") if $#ARGV < 0; + +$target=$ARGV[0]; + +$basename = basename($target,""); +$dirname = dirname($target,""); +if ($dirname eq ".") { + print "$basename"; +} else { + $dir=cwd(); + chdir $dirname; + $nativename=cwd(); + chdir $dir; + $nativename="$nativename/$basename"; + print "$nativename"; +}