From 87eb1ffd5577c2cd3f0524da3ff7ffce0b407825 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 23:42:54 +0000 Subject: make install should also install the default dat files from codepages directory so we don't keep getting these stupid error messages about incorrect size for valid.dat upcase.dat and lowcase.dat (This used to be commit 4af0c7a93f626dde33fd737618c2b786f83046c7) --- source3/script/installdat.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 source3/script/installdat.sh (limited to 'source3/script/installdat.sh') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh new file mode 100755 index 0000000000..7ff88ac788 --- /dev/null +++ b/source3/script/installdat.sh @@ -0,0 +1,23 @@ +#!/bin/sh +#fist version March 2002, Herb Lewis + +DATDIR=$1 +SRCDIR=$2/ + +echo Installing dat files in $DATDIR + +for f in $SRCDIR/codepages/*.dat; do + FNAME=$DATDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +cat << EOF +====================================================================== +The dat files have been installed. +====================================================================== +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/installdat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script/installdat.sh') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 7ff88ac788..4a5b1de5dc 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -1,7 +1,7 @@ #!/bin/sh #fist version March 2002, Herb Lewis -DATDIR=$1 +DATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ echo Installing dat files in $DATDIR -- 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/installdat.sh | 62 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 10 deletions(-) (limited to 'source3/script/installdat.sh') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 4a5b1de5dc..5d7958e273 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -1,23 +1,65 @@ #!/bin/sh #fist version March 2002, Herb Lewis -DATDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ +DESTDIR=$1 +DATDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +shift +shift +shift -echo Installing dat files in $DATDIR +case $0 in + *uninstall*) + if test ! -d "$DESTDIR/$DATDIR"; then + echo "Directory $DESTDIR/$DATDIR does not exist! " + echo "Do a "make installmsg" or "make install" first. " + exit 1 + fi + mode='uninstall' + ;; + *) mode='install' ;; +esac -for f in $SRCDIR/codepages/*.dat; do - FNAME=$DATDIR/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME +for f in $@; do + FNAME="$DESTDIR/$DATDIR/$f.dat" + if test "$mode" = 'install'; then + echo "Installing $f.dat as $FNAME " + cp "$SRCDIR/codepages/$f.dat" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + echo "Removing $FNAME " + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + else + echo "Unknown mode, $mode. Script called as $0 " + exit 1 + fi done -cat << EOF +if test "$mode" = 'install'; then + cat << EOF ====================================================================== -The dat files have been installed. +The dat files have been installed. You may uninstall the dat files +using the command "make uninstalldat" or "make uninstall" to uninstall +binaries, man pages, dat files, and shell scripts. ====================================================================== EOF +else + cat << EOF +====================================================================== +The dat files have been removed. You may restore these files using +the command "make installdat" or "make install" to install binaries, +man pages, modules, dat files, and shell scripts. +====================================================================== +EOF +fi exit 0 -- cgit From 21760b0001d5ab645c15a730c543ee870753e419 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Sat, 25 Feb 2006 17:58:52 +0000 Subject: r13688: Revert change to set DAT_FILES and SWAT_MSG_FILES in the Makefile. Instead check for *.dat and *.msg files as done before. Then added files are installed and removed as soon as we have some in the filesystem. It's simpler and less error prone. (This used to be commit 5119472cdcdc4a0e422d49290c3007527fefd6a2) --- source3/script/installdat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/script/installdat.sh') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 5d7958e273..298b29452b 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -20,16 +20,16 @@ case $0 in *) mode='install' ;; esac -for f in $@; do - FNAME="$DESTDIR/$DATDIR/$f.dat" +for f in $SRCDIR/codepages/*.dat; do + FNAME="$DESTDIR/$DATDIR/`basename $f`" if test "$mode" = 'install'; then - echo "Installing $f.dat as $FNAME " - cp "$SRCDIR/codepages/$f.dat" "$FNAME" + echo "Installing $f as $FNAME " + cp "$f" "$FNAME" if test ! -e "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi - chmod 0644 $FNAME + chmod 0644 "$FNAME" elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" -- cgit From bf565b7b7bfef0219db59bf5920abcc522f99aa5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Mar 2006 17:00:56 +0000 Subject: r13816: Volunteering :-) > for the svn log: > > - Solaris' /bin/sh doesn't know "test -e" - let's use "test -f" instead > > Some volunteer wanna check this in? :) > > Cheers > Bjoern Volker (This used to be commit 58d5f2031ac6018417ecd3c2306c120b5c7d1e43) --- source3/script/installdat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script/installdat.sh') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 298b29452b..59bf2f919d 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -25,7 +25,7 @@ for f in $SRCDIR/codepages/*.dat; do if test "$mode" = 'install'; then echo "Installing $f as $FNAME " cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi @@ -33,7 +33,7 @@ for f in $SRCDIR/codepages/*.dat; do elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi -- cgit