From a6b3104042ee0f07af77753b0e8a6e49add52150 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 24 Sep 2003 01:27:39 +0000 Subject: Fix bug #456 for 3.0.0 release. More work on SWAT i18n support to appear in later releases. (This used to be commit c3267749054ade219d214bdaf6c21e4207bd2011) --- source3/script/installmsg.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 source3/script/installmsg.sh (limited to 'source3/script/installmsg.sh') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh new file mode 100644 index 0000000000..30ad404aa0 --- /dev/null +++ b/source3/script/installmsg.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# first version (Sept 2003) written by Shiro Yamada +# based on the first verion (March 2002) of installdat.sh written by Herb Lewis + +MSGDIR=$1 +SRCDIR=$2/ + +echo Installing msg files in $MSGDIR + +for f in $SRCDIR/po/*.msg; do + FNAME=$MSGDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +cat << EOF +====================================================================== +The msg 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/installmsg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script/installmsg.sh') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 30ad404aa0..5a41fe1ca8 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -2,7 +2,7 @@ # first version (Sept 2003) written by Shiro Yamada # based on the first verion (March 2002) of installdat.sh written by Herb Lewis -MSGDIR=$1 +MSGDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ echo Installing msg files in $MSGDIR -- 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/installmsg.sh | 64 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 11 deletions(-) (limited to 'source3/script/installmsg.sh') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 5a41fe1ca8..3bfa3ee772 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -2,22 +2,64 @@ # first version (Sept 2003) written by Shiro Yamada # based on the first verion (March 2002) of installdat.sh written by Herb Lewis -MSGDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ +DESTDIR=$1 +MSGDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +shift +shift +shift -echo Installing msg files in $MSGDIR +case $0 in + *uninstall*) + if test ! -d "$DESTDIR/$MSGDIR"; then + echo "Directory $DESTDIR/$MSGDIR does not exist! " + echo "Do a "make installmsg" or "make install" first. " + exit 1 + fi + mode='uninstall' + ;; + *) mode='install' ;; +esac -for f in $SRCDIR/po/*.msg; do - FNAME=$MSGDIR/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME +for f in $@; do + FNAME="$DESTDIR/$MSGDIR/$f.msg" + if test "$mode" = 'install'; then + echo "Installing $f.msg as $FNAME " + cp "$SRCDIR/po/$f.msg" "$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 -====================================================================== -The msg files have been installed. +if test "$mode" = 'install'; then + cat << EOF +============================================================================== +The SWAT msg files have been installed. You may uninstall the msg files using +the command "make uninstallmsg" or "make uninstall" to uninstall binaries, man +pages, msg files, and shell scripts. +============================================================================== +EOF +else + cat << EOF +============================================================================= +The SWAT msg files have been removed. You may restore these files using the +command "make installmsg" or "make install" to install binaries, man pages, +modules, msg 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/installmsg.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/script/installmsg.sh') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 3bfa3ee772..612568bbce 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -21,16 +21,16 @@ case $0 in *) mode='install' ;; esac -for f in $@; do - FNAME="$DESTDIR/$MSGDIR/$f.msg" +for f in $SRCDIR/po/*.msg; do + FNAME="$DESTDIR/$MSGDIR/`basename $f`" if test "$mode" = 'install'; then - echo "Installing $f.msg as $FNAME " - cp "$SRCDIR/po/$f.msg" "$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/installmsg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script/installmsg.sh') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 612568bbce..859e4c10cf 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -26,7 +26,7 @@ for f in $SRCDIR/po/*.msg; 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 @@ -34,7 +34,7 @@ for f in $SRCDIR/po/*.msg; 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