Mercurial > hg > octave-lojdl > gnulib-hg
changeset 931:d17caf0a9451
fix for abs pathnames
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Fri, 30 May 1997 14:00:47 +0000 |
parents | 589c196817a6 |
children | 66e219181392 |
files | lib/ylwrap |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ylwrap +++ b/lib/ylwrap @@ -70,7 +70,13 @@ 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 @@ -90,6 +96,6 @@ # Remove the directory. cd .. -rm -rf $dirname +#rm -rf $dirname exit $status