about summary refs log tree commit diff
path: root/Config
diff options
context:
space:
mode:
Diffstat (limited to 'Config')
-rwxr-xr-xConfig/installfns.sh22
-rwxr-xr-xConfig/uninstallfns.sh14
2 files changed, 20 insertions, 16 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
diff --git a/Config/uninstallfns.sh b/Config/uninstallfns.sh
index 655e5b8f2..97a35c0f7 100755
--- a/Config/uninstallfns.sh
+++ b/Config/uninstallfns.sh
@@ -11,18 +11,20 @@ for file in $FUNCTIONS_INSTALL; do
   fi
 done
 
+fndir=$DESTDIR$fndir
+
 for file in $install; do
   if test -f $sdir/$file; then
     if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
-      rm -f $DESTDIR$fndir/$file;
-      if test -f $DESTDIR$fndir.old/$file; then
-	mv $DESTDIR$fndir.old/$file $DESTDIR$fndir/$file
+      rm -f $fndir/$file;
+      if test -f $fndir.old/$file; then
+	mv $fndir.old/$file $fndir/$file
       fi
     else
       bfile="`echo $file | sed -e 's%^.*/%%'`"
-      rm -f "$DESTDIR$fndir/$bfile"; \
-      if test -f $DESTDIR$fndir.old/$bfile; then
-        mv $DESTDIR$fndir.old/$bfile $DESTDIR$fndir/$bfile
+      rm -f "$fndir/$bfile"; \
+      if test -f $fndir.old/$bfile; then
+        mv $fndir.old/$bfile $fndir/$bfile
       fi
     fi
   fi