/usr/bin/bigmake \
/usr/bin/adduser \
/usr/bin/binpackage \
+ /usr/bin/binpackages \
/usr/bin/cd \
/usr/bin/[ \
/usr/bin/command \
/usr/bin/binpackage: binpackage.sh
install -m 755 -c -o bin $? $@
+/usr/bin/binpackages: binpackages.sh
+ install -m 755 -c -o bin $? $@
+
/usr/bin/adduser: adduser.sh
install -m 755 -c -o bin $? $@
set -e
-dir=$1
+# No trailing slashes in the directory, because we want to base the
+# package filename on it.
+dir=`echo "$1" | sed 's/\/*$//'`
-if [ $# -lt 1 ]
-then echo "Usage: $0 packagedir"
+if [ $# -ne 2 ]
+then echo "Usage: $0 sourcedir packagedir"
exit 1
fi
findlist=$srcdir/findlist
tarfile=${dir}.tar
tar=$srcdir/$tarfile
-targz=$tarfile.gz
+tarbz=$tar.bz
+pdir="$2"
+mkdir $pdir 2>/dev/null || true
binsizes big
touch $packagestart
sleep 1
exit 1
fi
-sh build
+sh -e build
cd /
-echo " * Making file index, writing $targz"
-find / -cnewer $packagestart | grep -v "^$srcdir" | grep -v "^/dev" | grep -v "^/tmp" | grep -v "^/usr/tmp" | pax -w -d -z >$targz
-echo " * Ok. Cleanup.."
+echo " * Building package"
+find / -cnewer $packagestart | grep -v "^$srcdir" | grep -v "^/dev" | grep -v "^/tmp" | grep -v "^/usr/tmp" | grep -v "^/usr/log" | grep -v "^/usr/adm" | grep -v "^/etc/utmp" | grep -v "^/usr/src" | pax -w -d | bzip2 >$tarbz
rm -f $packagestart $findlist $tarcmd
binsizes normal
-mv $targz $here
-ls -al $here/$targz
+mv $tarbz $here/$pdir
exit 0
--- /dev/null
+#!/bin/sh
+
+pdir=Packages
+
+for d in */build
+do
+ dir="`echo $d | sed 's/\/build$//'`"
+ if [ ! -f $pdir/$dir.tar.gz ]
+ then
+ echo " * $dir"
+ binpackage $dir $pdir
+ fi
+done
# It is now unpacked. Build it
cd $i
+ binsizes big
if sh build >>$ORIG_DIR/Log 2>&1
then echo Package $i installed
else echo Package $i failed to install, see Log
fi
+ binsizes normal
# Clean up
cd ..
#!/bin/sh
-
+BZIP=/usr/local/bin/bzip2
RM="rm -f"
MV="mv -f"
then exit 1
fi
+if [ ! -x "$BZIP" ]
+then exit 1
+fi
+
if [ "$2" -le 0 ]
then echo "Keep at least 1 copy please."
exit 1
$RM "$1.$k" 2>/dev/null || exit 1
while [ "$k" -ge 2 ]
do prev="`expr $k - 1`"
- $MV $1.$prev.gz $1.$k.gz 2>/dev/null
+ $MV $1.$prev.bz $1.$k.bz 2>/dev/null
k=$prev
done
-gzip -c $1 >$1.1.gz && : >$1
+$BZIP -c $1 >$1.1.bz && : >$1