about summary refs log tree commit diff
path: root/Config/uninstallfns.sh
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-14 19:14:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-14 19:14:40 +0000
commite142bdeb17005fdb974b0352c743f9da68dbb8aa (patch)
tree6ff0657f3ec5540579bbce67fcbe950e7782f106 /Config/uninstallfns.sh
parent9fc3e9a8dbfd2bbce2fd825a104414994539cd4d (diff)
downloadzsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.tar.gz
zsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.tar.xz
zsh-e142bdeb17005fdb974b0352c743f9da68dbb8aa.zip
zsh-workers/9322
Diffstat (limited to 'Config/uninstallfns.sh')
-rwxr-xr-xConfig/uninstallfns.sh34
1 files changed, 20 insertions, 14 deletions
diff --git a/Config/uninstallfns.sh b/Config/uninstallfns.sh
index 97a35c0f7..1f7e0c54b 100755
--- a/Config/uninstallfns.sh
+++ b/Config/uninstallfns.sh
@@ -14,20 +14,26 @@ 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 $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 "$fndir/$bfile"; \
-      if test -f $fndir.old/$bfile; then
-        mv $fndir.old/$bfile $fndir/$bfile
-      fi
-    fi
-  fi
+  case $fndir in
+    *$VERSION*)
+       # Version specific function directory, safe to remove completely.
+       # However, we don't remove the top-level version directory since
+       # it could have other things than functions in it.  We could
+       # do that instead in the top-level Makefile on a full uninstall,
+       # if we wanted.
+       rm -rf $fndir
+       ;;
+    *)
+       if test -f $sdir/$file; then
+	 if test x$FUNCTIONS_SUBDIRS != x -a x$FUNCTIONS_SUBDIRS != xno; then
+	   rm -f $fndir/$file;
+	 else
+	   bfile="`echo $file | sed -e 's%^.*/%%'`"
+	   rm -f "$fndir/$bfile"; \
+	 fi
+       fi
+       ;;
+  esac
 done
 
 exit 0