From d98f1075443b7feedab0212e75366d502b20e17a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 May 2013 12:36:34 +1000 Subject: build: Remove unused install*.sh scripts Reviewed-by: Jelmer Vernooij Reviewed-by: David Disseldorp --- source3/script/installbin.sh.in | 34 ---------------- source3/script/installdat.sh | 65 ------------------------------ source3/script/installdirs.sh | 18 --------- source3/script/installman.sh | 87 ---------------------------------------- source3/script/installmo.sh | 87 ---------------------------------------- source3/script/installmodules.sh | 42 ------------------- source3/script/installscripts.sh | 47 ---------------------- 7 files changed, 380 deletions(-) delete mode 100755 source3/script/installbin.sh.in delete mode 100755 source3/script/installdat.sh delete mode 100755 source3/script/installdirs.sh delete mode 100755 source3/script/installman.sh delete mode 100755 source3/script/installmo.sh delete mode 100755 source3/script/installmodules.sh delete mode 100755 source3/script/installscripts.sh (limited to 'source3') diff --git a/source3/script/installbin.sh.in b/source3/script/installbin.sh.in deleted file mode 100755 index c607d9e445..0000000000 --- a/source3/script/installbin.sh.in +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -INSTALLPERMS=$1 -DESTDIR=$2 -prefix=`echo $3 | sed 's/\/\//\//g'` -BINDIR=`echo $4 | sed 's/\/\//\//g'` -SBINDIR=@sbindir@ -shift -shift -shift -shift - -for p in $*; do - p2=`basename $p` - echo "Installing $p as $DESTDIR/$BINDIR/$p2 " - if [ -f $DESTDIR/$BINDIR/$p2 ]; then - rm -f $DESTDIR/$BINDIR/$p2.old - mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old - fi - cp $p $DESTDIR/$BINDIR/ - chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 -done - - -cat << EOF -====================================================================== -The binaries are installed. You may restore the old binaries (if there -were any) using the command "make revert". You may uninstall the binaries -using the command "make uninstallbin" or "make uninstall" to uninstall -binaries, man pages and shell scripts. -====================================================================== -EOF - -exit 0 diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh deleted file mode 100755 index 2cc3677fba..0000000000 --- a/source3/script/installdat.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -#fist version March 2002, Herb Lewis - -DESTDIR=$1 -DATDIR=`echo $2 | sed 's/\/\//\//g'` -SRCDIR=$3/ -shift -shift -shift - -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="$DESTDIR/$DATDIR/`basename $f`" - if test "$mode" = 'install'; then - echo "Installing $f as $FNAME " - cp "$f" "$FNAME" - if test ! -f "$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 -f "$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 - -if test "$mode" = 'install'; then - cat << EOF -====================================================================== -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 - diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh deleted file mode 100755 index 062b34b8c6..0000000000 --- a/source3/script/installdirs.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -INSTALLPERMS=$1 -DESTDIR=`echo $2 | sed 's/\/\//\//g'` -shift -shift - -for dir in $@; do - DIRNAME=`echo $dir | sed 's/\/\//\//g'` - if [ ! -d $DESTDIR/$DIRNAME ]; then - mkdir -m $INSTALLPERMS -p $DESTDIR/$DIRNAME - fi - - if [ ! -d $DESTDIR/$DIRNAME ]; then - echo "Failed to make directory $DESTDIR/$DIRNAME " - exit 1 - fi -done diff --git a/source3/script/installman.sh b/source3/script/installman.sh deleted file mode 100755 index b029089ab2..0000000000 --- a/source3/script/installman.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values -# -# 13 Aug 2001 Rafal Szczesniak -# modified to accomodate international man pages (inspired -# by Japanese edition's approach) - -MANDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ -langs=$3 - -if [ $# -ge 4 ] ; then - GROFF=$4 # sh cmd line, including options -fi - -if test ! -d $SRCDIR../bin/docs/manpages; then - echo "No manpages present. Development version maybe?" - exit 0 -fi - -# Get the configured feature set -test -f "${SRCDIR}/config.log" && \ - eval `grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log" | - grep -v ^MANDIR | grep -v ^SRCDIR` - -for lang in $langs; do - if [ "X$lang" = XC ]; then - echo Installing default man pages in $MANDIR/ - lang=. - else - echo Installing \"$lang\" man pages in $MANDIR/lang/$lang - fi - - langdir=$MANDIR/$lang - for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do - if [ ! -d $d ]; then - mkdir $d - if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? - exit 1 - fi - fi - done - - for sect in 1 5 7 8 ; do - for m in $langdir/man$sect ; do - for s in $SRCDIR../bin/docs/manpages/$lang/*$sect; do - MP_BASENAME=`basename $s` - - # Check if this man page if required by the configured feature set - case "${MP_BASENAME}" in - smbsh.1) test -z "${SMBWRAPPER}" && continue ;; - *) ;; - esac - - FNAME="$m/${MP_BASENAME}" - - # Test for writability. Involves - # blowing away existing files. - - if (rm -f $FNAME && touch $FNAME); then - if [ "x$GROFF" = x ] ; then - cp $s $m # Copy raw nroff - else - echo "\t$FNAME" # groff'ing can be slow, give the user - # a warm fuzzy. - $GROFF $s > $FNAME # Process nroff, because man(1) (on - # this system) doesn't . - fi - chmod 0644 $FNAME - else - echo Cannot create $FNAME... does $USER have privileges? - fi - done - done - done -done -cat << EOF -====================================================================== -The man pages have been installed. You may uninstall them using the command -the command "make uninstallman" or make "uninstall" to uninstall binaries, -man pages and shell scripts. -====================================================================== -EOF - -exit 0 - diff --git a/source3/script/installmo.sh b/source3/script/installmo.sh deleted file mode 100755 index 5ca3371d80..0000000000 --- a/source3/script/installmo.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh - -DESTDIR=$1 -LOCALEDIR=`echo $2 | sed 's/\/\//\//g'` -SRCDIR=$3/ -MSGFMT=msgfmt - -case $0 in - *uninstall*) - if test ! -d "$DESTDIR/$LOCALEDIR"; then - echo "Directory $DESTDIR/$LOCALEDIR doesn't exist!" - echo "Do a \"make installmo\" or \"make install\" first." - exit 1 - fi - mode='uninstall' - ;; - *) - mode='install' - ;; -esac - -for dir in $SRCDIR/locale/*; do - MODULE=`basename $dir` - for f in $SRCDIR/locale/$MODULE/*.po; do - BASE=`basename $f` - LANGUAGE=`echo $BASE | sed 's/\.po//g'` - if test "$LANGUAGE" = '*'; then - echo "No .po file exists!" - exit 0 - fi - FNAME="$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/$MODULE.mo" - if test ! -d "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/"; then - mkdir -p "$DESTDIR/$LOCALEDIR/$LANGUAGE/LC_MESSAGES/" - fi - if test "$mode" = 'install'; then - echo "Installing $f as $FNAME" - touch "$FNAME" - $MSGFMT -f -o "$FNAME" "$f" - if test ! -f "$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 -f "$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 - if test "$mode" = 'install'; then - cat << EOF -============================================================== -MO files for $MODULE are installed. -============================================================== -EOF - else - cat << EOF -============================================================== -MO files for $MODULE are removed. -============================================================== -EOF - fi -done - -if test "$mode" = 'install'; then - cat << EOF -============================================================== -All MO files for Samba are installed. You can use "make uninstall" -or "make uninstallmo" to remove them. -============================================================== -EOF -else - cat << EOF -============================================================== -All MO files for Samba are removed. you can use "make install" -or "make installmo" to install them. -============================================================== -EOF -fi - -exit 0 diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh deleted file mode 100755 index 127091d808..0000000000 --- a/source3/script/installmodules.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -INSTALLPERMS=$1 -DESTDIR=$2 -prefix=`echo $3 | sed 's/\/\//\//g'` -LIBDIR=`echo $4 | sed 's/\/\//\//g'` -shift -shift -shift -shift - -for d in $prefix $LIBDIR; do -if [ ! -d $DESTDIR/$d ]; then -mkdir $DESTDIR/$d -if [ ! -d $DESTDIR/$d ]; then - echo Failed to make directory $DESTDIR/$d - exit 1 -fi -fi -done - -# We expect the last component of LIBDIR to be the module type, eg. idmap, -# pdb. By stripping this from the installation name, you can have multiple -# modules of the same name but different types by creating eg. idmap_foo -# and pdb_foo. This makes the most sense for idmap and pdb module, where -# they need to be consistent. -mtype=`basename $LIBDIR` - -for p in $*; do - p2=`basename $p` - name=`echo $p2 | sed -es/${mtype}_//` - echo Preserving old module as $DESTDIR/$LIBDIR/$name.old - if [ -f $DESTDIR/$LIBDIR/$name ]; then - rm -f $DESTDIR/$LIBDIR/$name.old - mv $DESTDIR/$LIBDIR/$name $DESTDIR/$LIBDIR/$name.old - fi - echo Installing $p as $DESTDIR/$LIBDIR/$name - cp -f $p $DESTDIR/$LIBDIR/$name - chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$name -done - -exit 0 diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh deleted file mode 100755 index 81608c3682..0000000000 --- a/source3/script/installscripts.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# this script courtesy of James_K._Foote.PARC@xerox.com -# 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make - -INSTALLPERMS=$1 -BINDIR=`echo $2 | sed 's/\/\//\//g'` - -shift -shift - -echo Installing scripts in $BINDIR - -for d in $BINDIR; do - if [ ! -d $d ]; then - mkdir $d - if [ ! -d $d ]; then - echo Failed to make directory $d - echo Have you run installbin first? - exit 1 - fi - fi -done - -for p in $*; do - p2=`basename $p` - echo Installing $BINDIR/$p2 - if [ -f $BINDIR/$p2 ]; then - rm -f $BINDIR/$p2.old - mv $BINDIR/$p2 $BINDIR/$p2.old - fi - cp $p $BINDIR/ - chmod $INSTALLPERMS $BINDIR/$p2 - if [ ! -f $BINDIR/$p2 ]; then - echo Cannot copy $p2... does $USER have privileges? - fi -done - -cat << EOF -====================================================================== -The scripts have been installed. You may uninstall them using -the command "make uninstallscripts" or "make install" to install binaries, -man pages and shell scripts. You may recover the previous version (if any -by "make revert". -====================================================================== -EOF - -exit 0 -- cgit