From 97bec3fc3e676e088ea78ba81ea02cb4f9434edb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Nov 2002 20:38:56 +0000 Subject: Remove obsolete scripts and put in module install/uninstall (This used to be commit d777bba5082ebdf78d314b0d7b4196a4d6413e1f) --- source3/script/uninstallmodules.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 source3/script/uninstallmodules.sh (limited to 'source3/script/uninstallmodules.sh') diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh new file mode 100755 index 0000000000..30582a39fa --- /dev/null +++ b/source3/script/uninstallmodules.sh @@ -0,0 +1,37 @@ +#!/bin/sh +#4 July 96 Dan.Shearer@UniSA.edu.au + +INSTALLPERMS=$1 +BASEDIR=$2 +LIBDIR=$3 +shift +shift +shift + +if [ ! -d $LIBDIR ]; then + echo Directory $LIBDIR does not exist! + echo Do a "make installmodules" or "make install" first. + exit 1 +fi + +for p in $*; do + p2=`basename $p` + if [ -f $LIBDIR/$p2 ]; then + echo Removing $LIBDIR/$p2 + rm -f $LIBDIR/$p2 + if [ -f $LIBDIR/$p2 ]; then + echo Cannot remove $LIBDIR/$p2 ... does $USER have privileges? + fi + fi +done + + +cat << EOF +====================================================================== +The modules have been uninstalled. You may restore the modules using +the command "make installmodules" or "make install" to install +binaries, modules, man pages and shell scripts. +====================================================================== +EOF + +exit 0 -- cgit From 629120a0a1ee0726cf6f43bf841ca042d2b0229e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 6 Oct 2003 19:24:17 +0000 Subject: cosmetic fix when DESTDIR=/ (default) (This used to be commit e660b5752aa129c49b0b665845de2fe4c160be00) --- source3/script/uninstallmodules.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script/uninstallmodules.sh') diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index 30582a39fa..ac83af3dc9 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -2,8 +2,8 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=$2 -LIBDIR=$3 +BASEDIR=`echo $2 | sed 's/\/\//\//g'` +LIBDIR=`echo $3 | sed 's/\/\//\//g'` shift shift shift -- cgit From 9169edfeb4ea4358dbaf948372847542fb57464e Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Fri, 24 Feb 2006 00:30:09 +0000 Subject: r13663: make uninstall DESTDIR=/somewhere no longer leaves files. This is done with the new rules: uninstallservers uninstalldat, uninstallswat (calles uninstallmsg), uninstallmodules, uninstallclientlib, and uninstalllibmsrpc. We still leave directories. We might try to remove the dirs we created in reverse order. The new uninstall scripts are sym links to the respective install scripts. Inside we set mode to install or uninstall. installservers is now used to install the servers. These are no longer installed with installbin. (This used to be commit 43549301b937c060742840054017b31bf3781e04) --- source3/script/uninstallmodules.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'source3/script/uninstallmodules.sh') diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index ac83af3dc9..194435bda3 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -2,25 +2,27 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=`echo $2 | sed 's/\/\//\//g'` -LIBDIR=`echo $3 | sed 's/\/\//\//g'` +DESTDIR=$2 +BASEDIR=`echo $3 | sed 's/\/\//\//g'` +LIBDIR=`echo $4 | sed 's/\/\//\//g'` +shift shift shift shift -if [ ! -d $LIBDIR ]; then - echo Directory $LIBDIR does not exist! - echo Do a "make installmodules" or "make install" first. +if [ ! -d $DESTDIR/$LIBDIR ]; then + echo "Directory $DESTDIR/$LIBDIR does not exist! " + echo "Do a "make installmodules" or "make install" first. " exit 1 fi for p in $*; do p2=`basename $p` - if [ -f $LIBDIR/$p2 ]; then - echo Removing $LIBDIR/$p2 - rm -f $LIBDIR/$p2 - if [ -f $LIBDIR/$p2 ]; then - echo Cannot remove $LIBDIR/$p2 ... does $USER have privileges? + if [ -f $DESTDIR/$LIBDIR/$p2 ]; then + echo "Removing $DESTDIR/$LIBDIR/$p2 " + rm -f $DESTDIR/$LIBDIR/$p2 + if [ -f $DESTDIR/$LIBDIR/$p2 ]; then + echo "Cannot remove $DESTDIR/$LIBDIR/$p2 ... does $USER have privileges? " fi fi done -- cgit From f27228fc317ec8ad717beee18a0a193650addde9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 8 Mar 2006 21:20:43 +0000 Subject: r14052: Remove BASEDIR use in the Makefile. BASEDIR=prefix=@prefix@ till now. I suggest to stay with ^BASEDIR= @prefix@$ for at least the next release to give external projects - like samba-vscan project - time to adopt this change. BASEDIR is non of the default autoconf variables. prefix is. Jerry1: If possible please announce this with the next release. I'll self reply to technical. Jerry2: This does not break your makepkg stuff as you set BASEDIR _not_ from the Makefile. (This used to be commit 730d5ec22948c579a81137051134657043c34415) --- source3/script/uninstallmodules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script/uninstallmodules.sh') diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index 194435bda3..fc80565cb5 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -3,7 +3,7 @@ INSTALLPERMS=$1 DESTDIR=$2 -BASEDIR=`echo $3 | sed 's/\/\//\//g'` +prefix=`echo $3 | sed 's/\/\//\//g'` LIBDIR=`echo $4 | sed 's/\/\//\//g'` shift shift -- cgit