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
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