Remove obsolete scripts and put in module install/uninstall
authorJelmer Vernooij <jelmer@samba.org>
Wed, 13 Nov 2002 20:38:56 +0000 (20:38 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 13 Nov 2002 20:38:56 +0000 (20:38 +0000)
(This used to be commit d777bba5082ebdf78d314b0d7b4196a4d6413e1f)

source3/script/installcp.sh [deleted file]
source3/script/installmodules.sh [new file with mode: 0755]
source3/script/makeyodldocs.sh [deleted file]
source3/script/uninstallbin.sh
source3/script/uninstallcp.sh [deleted file]
source3/script/uninstallmodules.sh [new file with mode: 0755]

diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh
deleted file mode 100755 (executable)
index d0c5bf8..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-srcdir=$1
-LIBDIR=$2
-CODEPAGEDIR=$3
-BINDIR=$4
-
-shift
-shift
-shift
-shift
-
-echo Installing codepage files in $CODEPAGEDIR
-for d in $LIBDIR $CODEPAGEDIR; do
-if [ ! -d $d ]; then
-mkdir $d
-if [ ! -d $d ]; then
-  echo Failed to make directory $d
-  exit 1
-fi
-fi
-done
-
-for p in $*; do
- if [ -f ${srcdir}/codepages/codepage_def.$p ]; then
-   echo Creating codepage file $CODEPAGEDIR/codepage.$p
-   $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p
- fi
- if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then
-   echo Creating unicode map $CODEPAGEDIR/unicode_map.$p
-   $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p
- fi
-done
-
-
-cat << EOF
-======================================================================
-The code pages have been installed. You may uninstall them using the
-command "make uninstallcp" or make "uninstall" to uninstall binaries,
-man pages, shell scripts and code pages.
-======================================================================
-EOF
-
-exit 0
-
diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh
new file mode 100755 (executable)
index 0000000..9b9d950
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+INSTALLPERMS=$1
+BASEDIR=$2
+LIBDIR=$3
+shift
+shift
+shift
+
+for p in $*; do
+ p2=`basename $p`
+ echo Installing $p as $LIBDIR/$p2
+ cp -f $p $LIBDIR/
+ chmod $INSTALLPERMS $LIBDIR/$p2
+done
+
+
+cat << EOF
+======================================================================
+The modules are installed.  You may uninstall the modules using the 
+command "make uninstallmodules" or "make uninstall" to uninstall
+binaries, man pages, shell scripts and modules.
+======================================================================
+EOF
+
+exit 0
diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh
deleted file mode 100755 (executable)
index 5b54df0..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/sh
-SRCDIR=$1
-shift
-FILES=$@
-
-if test -z $FILES; then
-    FILES=*.yo
-fi
-
-YODLDIR=$SRCDIR/../docs/yodldocs
-MANPAGEDIR=$SRCDIR/../docs/manpages
-HTMLDIR=$SRCDIR/../docs/htmldocs
-
-echo "Re-creating man pages and HTML pages from YODL sources..."
-
-if [ ! -d $MANPAGEDIR ]; then
-  echo "directory $MANPAGEDIR does not exist, are we in the right place?"
-  exit 1
-fi
-
-if [ ! -d $HTMLDIR ]; then
-  echo "directory $HTMLDIR does not exist, are we in the right place?"
-  exit 1
-fi
-
-if [ ! -d $YODLDIR ]; then
-  echo "directory $YODLDIR does not exist, are we in the right place?"
-  exit 1
-fi
-
-cd $YODLDIR
-
-for d in $FILES
-do
-
-#
-# Create the basename from the YODL manpage
-#
-    bn=`echo $d | sed -e 's/\.yo//'`
-
-       case "$d"
-       in
-               *.[0-9].yo)
-                       echo "Creating man pages..."
-                       echo $d
-                       rm -f $bn.man
-                       yodl2man $d
-                       if [ ! -f $bn.man ]; then
-                               echo "Failed to make man page for $d"
-                               exit 1
-                       fi
-                       cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn"
-                       rm -f $bn.man
-
-                       echo "Creating html versions of man pages..."
-                       echo $d
-                       rm -f $bn.html
-                       yodl2html $d
-                       if [ ! -f $bn.html ]; then
-                               echo "Failed to make html page for $d"
-                               exit 1
-                       fi
-                       cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
-                       rm -f $bn.html
-               ;;
-               *)
-#
-# Non man-page YODL docs - just make html and text.
-#
-                       echo $d
-                       rm -f $bn.html
-                       yodl2html $d
-                       if [ ! -f $bn.html ]; then
-                echo "Failed to make html page for $d"
-                exit 1
-            fi
-                       cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
-                       rm -f $bn.html
-                       rm -f $bn.txt
-                       yodl2txt $d
-                       if [ ! -f $bn.txt ]; then
-                echo "Failed to make text page for $d"
-                exit 1
-            fi
-                       cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt"
-                       rm -f $bn.txt
-               ;;
-       esac
-done
-
-echo "Remember to CVS check in your changes..."
-exit 0
index 53775f8946590218c250f45e7da49594ab7d0a3a..a8bbdea7afdfe983c89fb89f2c621c4ac45105da 100755 (executable)
@@ -34,8 +34,8 @@ cat << EOF
 ======================================================================
 The binaries have been uninstalled. You may restore the binaries using
 the command "make installbin" or "make install" to install binaries, 
-man pages and shell scripts. You can restore a previous version of the
-binaries (if there were any) using "make revert".
+man pages, modules and shell scripts. You can restore a previous
+version of the binaries (if there were any) using "make revert".
 ======================================================================
 EOF
 
diff --git a/source3/script/uninstallcp.sh b/source3/script/uninstallcp.sh
deleted file mode 100755 (executable)
index 2a9e9d5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-CPDIR=$1
-shift
-
-if [ ! -d $CPDIR ]; then
-  echo Directory $CPDIR does not exist!
-  echo Do a "make installcp" or "make install" first.
-  exit 1
-fi
-
-for p in $*; do
-  if [ ! -f $CPDIR/unicode_map.$p ]; then
-    echo $CPDIR/unicode_map.$p does not exist!
-  else
-    echo Removing $CPDIR/unicode_map.$p
-    rm -f $CPDIR/unicode_map.$p
-    if [ -f $CPDIR/unicode_map.$p ]; then
-      echo Cannot remove $CPDIR/unicode_map.$p...  does $USER have privileges?
-    fi
-  fi
-done
-
-cat << EOF
-======================================================================
-The code pages have been uninstalled. You may reinstall them using
-the command "make installcp" or "make install" to install binaries,
-man pages, shell scripts and code pages. You may recover a previous version 
-(if any with "make revert").
-======================================================================
-EOF
-
-exit 0
diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh
new file mode 100755 (executable)
index 0000000..30582a3
--- /dev/null
@@ -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