summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-10 01:55:42 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-10 01:55:42 +0000
commit1c6f52cc284a75e304d10c098088c1c846c9efc8 (patch)
tree90260b384ff8eaf0150e920a14003ab48a9ae851
parent65a29b0ca56a78148b415fd817af245afc2bb0b9 (diff)
downloadsamba-1c6f52cc284a75e304d10c098088c1c846c9efc8.tar.gz
samba-1c6f52cc284a75e304d10c098088c1c846c9efc8.tar.bz2
samba-1c6f52cc284a75e304d10c098088c1c846c9efc8.zip
fixed the installation scripts for the new layout
(This used to be commit 60cdb83f3f6dfd7755e46254662245a82a8ef498)
-rw-r--r--source3/Makefile.in37
-rw-r--r--source3/bin/.cvsignore5
-rwxr-xr-xsource3/script/installbin.sh12
-rwxr-xr-xsource3/script/installcp.sh4
-rwxr-xr-xsource3/script/installman.sh1
-rwxr-xr-xsource3/script/installscripts.sh15
-rwxr-xr-xsource3/script/revert.sh13
-rwxr-xr-xsource3/script/uninstallbin.sh13
-rwxr-xr-xsource3/script/uninstallman.sh4
-rwxr-xr-xsource3/script/uninstallscripts.sh13
10 files changed, 62 insertions, 55 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index b5816c4c39..8f0bf969ec 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -76,7 +76,7 @@ PROGS1 = bin/smbclient bin/testparm bin/testprns bin/smbrun bin/smbstatus
PROGS2 = bin/smbpasswd bin/make_smbcodepage
PROGS = $(PROGS1) $(PROGS2) bin/nmblookup bin/make_printerdef
-SCRIPTS = smbtar addtosmbpass
+SCRIPTS = script/smbtar script/addtosmbpass
######################################################################
@@ -264,50 +264,47 @@ smbtorture: torture.o getsmbpass.o $(UTILOBJ) $(CLIENTUTIL)
install: installbin installman installscripts installcp installswat
installbin: all
- @$(SHELL) $(srcdir)/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
- @$(SHELL) $(srcdir)/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
+ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
+ @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
installscripts:
- @$(SHELL) $(srcdir)/installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
+ @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
installcp:
- @$(SHELL) $(srcdir)/installcp.sh $(LIBDIR) $(CODEPAGEDIR) $(BINDIR) $(CODEPAGELIST)
+ @$(SHELL) $(srcdir)/script/installcp.sh $(LIBDIR) $(CODEPAGEDIR) $(BINDIR) $(CODEPAGELIST)
installswat:
- @$(SHELL) $(srcdir)/installswat.sh $(SWATDIR) $(srcdir)
+ @$(SHELL) $(srcdir)/script/installswat.sh $(SWATDIR) $(srcdir)
# revert to the previously installed version
revert:
- @$(SHELL) $(srcdir)/revert.sh $(SBINDIR) $(SPROGS) $(SCRIPTS)
- @$(SHELL) $(srcdir)/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
+ @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SPROGS)
+ @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(PROGS) $(SCRIPTS)
installman:
- @$(SHELL) $(srcdir)/installman.sh $(MANDIR) $(srcdir)
+ @$(SHELL) $(srcdir)/script/installman.sh $(MANDIR) $(srcdir)
uninstall: uninstallman uninstallbin uninstallscripts uninstallcp
uninstallman:
- @$(SHELL) $(srcdir)/uninstallman.sh $(MANDIR) $(srcdir)
+ @$(SHELL) $(srcdir)/script/uninstallman.sh $(MANDIR) $(srcdir)
uninstallbin:
- @$(SHELL) $(srcdir)/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
- @$(SHELL) $(srcdir)/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
+ @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(SPROGS)
+ @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(BASEDIR) $(BINDIR) $(LIBDIR) $(VARDIR) $(PROGS)
uninstallscripts:
- @$(SHELL) $(srcdir)/uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
+ @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(BINDIR) $(SCRIPTS)
uninstallcp:
- @$(SHELL) $(srcdir)/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST)
+ @$(SHELL) $(srcdir)/script/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST)
clean:
- @echo Cleaning up ...
- @rm -f core *.o */*.o $(PROTOOBJ) lib/rpc/*/*.o *~ config.cache $(PROGS) $(SPROGS)
-
-cleandir: clean
- rm -f .depend tags
+ rm -f core */*.o */*~ *~ config.cache bin/*
proto:
- $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | grep -v "ubiqx/"` > include/proto.h
+ @echo rebuilding include/proto.h
+ @$(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | grep -v "ubiqx/"` > include/proto.h
etags:
etags `find . -name "*.[ch]"`
diff --git a/source3/bin/.cvsignore b/source3/bin/.cvsignore
index 753138a322..d9307fe8e8 100644
--- a/source3/bin/.cvsignore
+++ b/source3/bin/.cvsignore
@@ -1,7 +1,12 @@
+make_printerdef
+make_smbcodepage
nmbd
+nmblookup
smbclient
smbd
+smbpasswd
smbrun
+smbstatus
swat
testparm
testprns
diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh
index b976a3e5ea..22771ce5a0 100755
--- a/source3/script/installbin.sh
+++ b/source3/script/installbin.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+
INSTALLPERMS=$1
BASEDIR=$2
BINDIR=$3
@@ -22,12 +23,13 @@ done
for p in $*; do
- echo Installing $p as $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- mv $BINDIR/$p $BINDIR/$p.old
+ p2=`basename $p`
+ echo Installing $p as $BINDIR/$p2
+ if [ -f $BINDIR/$p2 ]; then
+ mv $BINDIR/$p2 $BINDIR/$p2.old
fi
- cp $p $BINDIR/$p
- chmod $INSTALLPERMS $BINDIR/$p
+ cp $p $BINDIR/
+ chmod $INSTALLPERMS $BINDIR/$p2
done
diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh
index c4f917113b..d1bc7f6291 100755
--- a/source3/script/installcp.sh
+++ b/source3/script/installcp.sh
@@ -19,8 +19,8 @@ fi
done
for p in $*; do
- echo Creating codepage file $CODEPAGEDIR/codepage.$p from codepage_def.$p
- $BINDIR/make_smbcodepage c $p codepage_def.$p $CODEPAGEDIR/codepage.$p
+ echo Creating codepage file $CODEPAGEDIR/codepage.$p
+ $BINDIR/make_smbcodepage c $p codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p
done
diff --git a/source3/script/installman.sh b/source3/script/installman.sh
index 95611dcc22..12a63e26c0 100755
--- a/source3/script/installman.sh
+++ b/source3/script/installman.sh
@@ -20,6 +20,7 @@ for sect in 1 5 7 8 ; do
for m in $MANDIR/man$sect ; do
for s in $SRCDIR../docs/*$sect; do
FNAME=$m/`basename $s`
+ echo Installing $FNAME
cp $s $m || echo Cannot create $FNAME... does $USER have privileges?
chmod 0644 $FNAME
done
diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh
index 1a230c8cfa..6d55317e9e 100755
--- a/source3/script/installscripts.sh
+++ b/source3/script/installscripts.sh
@@ -22,13 +22,16 @@ for d in $BINDIR; do
done
for p in $*; do
- echo Installing $BINDIR/$p
- cp $p $BINDIR/$p
- if [ ! -f $BINDIR/$p ]; then
- echo Cannot copy $p... does $USER have privileges?
+ p2=`basename $p`
+ echo Installing $BINDIR/$p2
+ if [ -f $BINDIR/$p2 ]; then
+ 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
- echo Setting permissions on $BINDIR/$p
- chmod $INSTALLPERMS $BINDIR/$p
done
cat << EOF
diff --git a/source3/script/revert.sh b/source3/script/revert.sh
index 68b47bf39d..8df5fd2fbd 100755
--- a/source3/script/revert.sh
+++ b/source3/script/revert.sh
@@ -3,11 +3,14 @@ BINDIR=$1
shift
for p in $*; do
- if [ -f $BINDIR/$p.old ]; then
- echo Restoring $BINDIR/$p.old as $BINDIR/$p
- mv $BINDIR/$p $BINDIR/$p.new
- mv $BINDIR/$p.old $BINDIR/$p
- rm -f $BINDIR/$p.new
+ p2=`basename $p`
+ if [ -f $BINDIR/$p2.old ]; then
+ echo Restoring $BINDIR/$p2.old
+ mv $BINDIR/$p2 $BINDIR/$p2.new
+ mv $BINDIR/$p2.old $BINDIR/$p2
+ rm -f $BINDIR/$p2.new
+ else
+ echo Not restoring $p
fi
done
diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh
index fab36804a2..53775f8946 100755
--- a/source3/script/uninstallbin.sh
+++ b/source3/script/uninstallbin.sh
@@ -19,13 +19,12 @@ if [ ! -d $BINDIR ]; then
fi
for p in $*; do
- if [ ! -f $BINDIR/$p ]; then
- echo $BINDIR/$p does not exist!
- else
- echo Removing $BINDIR/$p
- rm -f $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- echo Cannot remove $BINDIR/$p... does $USER have privileges?
+ p2=`basename $p`
+ if [ -f $BINDIR/$p2 ]; then
+ echo Removing $BINDIR/$p2
+ rm -f $BINDIR/$p2
+ if [ -f $BINDIR/$p2 ]; then
+ echo Cannot remove $BINDIR/$p2 ... does $USER have privileges?
fi
fi
done
diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh
index b4d4bfc1f9..b6d2524ec7 100755
--- a/source3/script/uninstallman.sh
+++ b/source3/script/uninstallman.sh
@@ -8,14 +8,12 @@ echo Uninstalling man pages from $MANDIR
for sect in 1 5 7 8 ; do
for m in $MANDIR/man$sect ; do
- for s in $SRCDIR../docs/*$sect; do
+ for s in $SRCDIR/../docs/*$sect; do
FNAME=$m/`basename $s`
if test -f $FNAME; then
echo Deleting $FNAME
rm -f $FNAME
test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges?
- else
- echo $FNAME does not exist! Check defines in the Makefile
fi
done
done
diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh
index ae907546f2..13104acedd 100755
--- a/source3/script/uninstallscripts.sh
+++ b/source3/script/uninstallscripts.sh
@@ -14,13 +14,12 @@ if [ ! -d $BINDIR ]; then
fi
for p in $*; do
- if [ ! -f $BINDIR/$p ]; then
- echo $BINDIR/$p does not exist!
- else
- echo Removing $BINDIR/$p
- rm -f $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- echo Cannot remove $BINDIR/$p... does $USER have privileges?
+ p2=`basename $p`
+ if [ -f $BINDIR/$p2 ]; then
+ echo Removing $BINDIR/$p2
+ rm -f $BINDIR/$p2
+ if [ -f $BINDIR/$p2 ]; then
+ echo Cannot remove $BINDIR/$p2 ... does $USER have privileges?
fi
fi
done