diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-07 23:07:57 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-07 23:07:57 +0000 |
commit | b4958a1a60bf2210143a78e52c7023ed30f800ed (patch) | |
tree | ef18f58a41509bffced5e94506954f162e828490 /Config/installfns.sh | |
parent | d14fab7bd7f9c73a1dd322798ba6f9ca416828d8 (diff) | |
download | zsh-b4958a1a60bf2210143a78e52c7023ed30f800ed.tar.gz zsh-b4958a1a60bf2210143a78e52c7023ed30f800ed.tar.xz zsh-b4958a1a60bf2210143a78e52c7023ed30f800ed.zip |
zsh-workers/7707
Diffstat (limited to 'Config/installfns.sh')
-rwxr-xr-x | Config/installfns.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Config/installfns.sh b/Config/installfns.sh index 9516ca18d..21147dea4 100755 --- a/Config/installfns.sh +++ b/Config/installfns.sh @@ -1,10 +1,12 @@ #!/bin/sh -if test -d $DESTDIR$fndir.old; then +fndir=$DESTDIR$fndir + +if test -d $fndir.old; then add_old=1 fi -$sdir_top/mkinstalldirs $DESTDIR$fndir || exit 1; +$sdir_top/mkinstalldirs $fndir || exit 1; # If the source directory is somewhere else, we need to force # the shell to expand it in that directory, then strip it off. @@ -22,17 +24,17 @@ for file in $install; do if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then subfile="$file" subdir="`echo $file | sed -e 's%/[^/]*$%%'`" - olddir="$DESTDIR$fndir.old/$subdir" - instdir="$DESTDIR$fndir/$subdir" + olddir="$fndir.old/$subdir" + instdir="$fndir/$subdir" else subfile="`echo $file | sed -e 's%^.*/%%'`" - olddir="$DESTDIR$fndir.old" - instdir="$DESTDIR$fndir" + olddir="$fndir.old" + instdir="$fndir" fi - if test -f $DESTDIR$fndir/$subfile; then - if cmp $DESTDIR$fndir/$subfile $sdir/$file >/dev/null; then :; else + if test -f $fndir/$subfile; then + if cmp $fndir/$subfile $sdir/$file >/dev/null; then :; else $sdir_top/mkinstalldirs $olddir - mv $DESTDIR$fndir/$subfile $olddir + mv $fndir/$subfile $olddir : ${add_old:=1} fi fi @@ -42,7 +44,7 @@ for file in $install; do done if test x$add_old != x1; then - rm -rf $DESTDIR$fndir.old + rm -rf $fndir.old fi exit 0 |