summaryrefslogtreecommitdiff
path: root/lib/ylwrap
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1997-06-01 19:19:19 +0000
committerTom Tromey <tromey@redhat.com>1997-06-01 19:19:19 +0000
commit7849ac20339e52b2b7185d35d80db3fdd7ebc873 (patch)
treede039dc7c7ae4010bc404b57e378af3417402d6b /lib/ylwrap
parent1e5974b3670284fdfeefc13394048f3f5ae337f3 (diff)
downloadautomake-7849ac20339e52b2b7185d35d80db3fdd7ebc873.tar.gz
another ylwrap fix from jim meyering
Diffstat (limited to 'lib/ylwrap')
-rwxr-xr-xlib/ylwrap8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/ylwrap b/lib/ylwrap
index 8aaff0f6f..fbae17bd7 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -70,7 +70,13 @@ if test $status -eq 0; then
first=yes
while test "$#" -ne 0; do
if test -f "$1"; then
- mv "$1" "../$2" || status=$?
+ # If $2 is an absolute path name, then just use that,
+ # otherwise prepend `../'.
+ case "$2" in
+ /*) target="$2";;
+ *) target="../$2";;
+ esac
+ mv "$1" "$target" || status=$?
else
# A missing file is only an error for the first file. This
# is a blatant hack to let us support using "yacc -d". If -d