Install scripts prettification
This commit is contained in:
parent
f0c525440b
commit
f9e23f7df0
2 changed files with 24 additions and 20 deletions
|
@ -1,9 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
|
||||||
cd /usr/src || exit 1
|
cd /usr/src || exit 1
|
||||||
|
make depend || exit 1
|
||||||
make world install || exit 1
|
make world install || exit 1
|
||||||
cd tools || exit 1
|
cd tools || exit 1
|
||||||
rm revision
|
rm revision
|
||||||
|
rm /boot/image/*
|
||||||
make hdboot || exit 1
|
make hdboot || exit 1
|
||||||
cp ../boot/boot /boot/boot || exit 1
|
cp ../boot/boot /boot/boot || exit 1
|
||||||
cd /usr/src || exit 1
|
cd /usr/src || exit 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
COPYITEMS="usr/src usr/bin bin usr/lib"
|
COPYITEMS="usr/bin bin usr/lib"
|
||||||
RELEASEDIR=/usr/r/release
|
RELEASEDIR=/usr/r/release
|
||||||
IMAGE=cdfdimage
|
IMAGE=cdfdimage
|
||||||
ROOTIMAGE=rootimage
|
ROOTIMAGE=rootimage
|
||||||
|
@ -9,16 +9,17 @@ ISO=minix.iso
|
||||||
ISOGZ=minix.iso.gz
|
ISOGZ=minix.iso.gz
|
||||||
RAM=/dev/ram
|
RAM=/dev/ram
|
||||||
BS=4096
|
BS=4096
|
||||||
rootmb=2
|
USRMB=200
|
||||||
rootkb=`expr $rootmb \* 1024`
|
USRBLOCKS="`expr $USRMB \* 1024 \* 1024 / $BS`"
|
||||||
rootbytes=`expr $rootkb \* 1024`
|
ROOTMB=2
|
||||||
if [ "`wc -c $RAM | awk '{ print $1 }'`" -ne $rootbytes ]
|
ROOTBLOCKS="`expr $ROOTMB \* 1024 \* 1024 / $BS`"
|
||||||
then echo "$RAM should be exactly ${rootkb}k."
|
echo "Note: this script wants to do cvs operations, so it's necessary"
|
||||||
exit 1
|
echo "to have \$CVSROOT set and cvs login done."
|
||||||
fi
|
echo ""
|
||||||
echo "Warning: I'm going to mkfs $RAM!"
|
echo "Warning: I'm going to mkfs $RAM! It has to be at least $ROOTMB MB."
|
||||||
|
echo ""
|
||||||
echo "Temporary (sub)partition to use to make the /usr FS image? "
|
echo "Temporary (sub)partition to use to make the /usr FS image? "
|
||||||
echo "It will be mkfsed!"
|
echo "I need $USRMB MB. It will be mkfsed!"
|
||||||
echo -n "Device: /dev/"
|
echo -n "Device: /dev/"
|
||||||
read dev || exit 1
|
read dev || exit 1
|
||||||
TMPDISK=/dev/$dev
|
TMPDISK=/dev/$dev
|
||||||
|
@ -38,21 +39,25 @@ echo " * Cleanup old files"
|
||||||
rm -rf $RELEASEDIR $ISO $IMAGE $ROOTIMAGE $ISOGZ $CDFILES
|
rm -rf $RELEASEDIR $ISO $IMAGE $ROOTIMAGE $ISOGZ $CDFILES
|
||||||
mkdir -p $CDFILES || exit
|
mkdir -p $CDFILES || exit
|
||||||
mkdir -p $RELEASEDIR
|
mkdir -p $RELEASEDIR
|
||||||
mkfs -B $BS $RAM || exit
|
echo " * Zeroing $RAM"
|
||||||
echo " * chowning to bin"
|
dd if=/dev/zero of=$RAM bs=$BS count=$ROOTBLOCKS
|
||||||
chown -R bin /usr/src
|
mkfs -B $BS -b $ROOTBLOCKS $RAM || exit
|
||||||
echo " * mounting $RAM as $RELEASEDIR"
|
echo " * mounting $RAM as $RELEASEDIR"
|
||||||
mount $RAM $RELEASEDIR || exit
|
mount $RAM $RELEASEDIR || exit
|
||||||
mkdir -m 755 $RELEASEDIR/usr
|
mkdir -m 755 $RELEASEDIR/usr
|
||||||
mkdir -m 1777 $RELEASEDIR/tmp
|
mkdir -m 1777 $RELEASEDIR/tmp
|
||||||
|
|
||||||
mkfs -B $BS $TMPDISK || exit
|
echo " * Zeroing $TMPDISK"
|
||||||
echo " * mounting $TMPDISK as $RELEASEDIR/usr"
|
#dd if=/dev/zero of=$TMPDISK bs=$BS count=$USRBLOCKS
|
||||||
|
mkfs -B $BS -b $USRBLOCKS $TMPDISK || exit
|
||||||
|
echo " * Mounting $TMPDISK as $RELEASEDIR/usr"
|
||||||
mount $TMPDISK $RELEASEDIR/usr || exit
|
mount $TMPDISK $RELEASEDIR/usr || exit
|
||||||
mkdir -p $RELEASEDIR/tmp
|
mkdir -p $RELEASEDIR/tmp
|
||||||
mkdir -p $RELEASEDIR/usr/tmp
|
mkdir -p $RELEASEDIR/usr/tmp
|
||||||
echo " * Transfering $COPYITEMS to $RELEASEDIR"
|
echo " * Transfering $COPYITEMS to $RELEASEDIR"
|
||||||
( cd / && tar cf - $COPYITEMS ) | ( cd $RELEASEDIR && tar xf - ) || exit 1
|
( cd / && tar cf - $COPYITEMS ) | ( cd $RELEASEDIR && tar xf - ) || exit 1
|
||||||
|
echo " * Doing new cvs export"
|
||||||
|
( cd $RELEASEDIR/usr && mkdir src && cvs export -rHEAD src >/dev/null )
|
||||||
chown -R bin $RELEASEDIR/usr/src
|
chown -R bin $RELEASEDIR/usr/src
|
||||||
# Bug tracking system not for on cd
|
# Bug tracking system not for on cd
|
||||||
rm -rf $RELEASEDIR/usr/src/doc/bugs
|
rm -rf $RELEASEDIR/usr/src/doc/bugs
|
||||||
|
@ -60,16 +65,13 @@ rm -rf $RELEASEDIR/usr/src/doc/bugs
|
||||||
rm -rf $RELEASEDIR/usr/src/contrib/gnu/coreutils*
|
rm -rf $RELEASEDIR/usr/src/contrib/gnu/coreutils*
|
||||||
# Make sure the CD knows it's a CD
|
# Make sure the CD knows it's a CD
|
||||||
date >$RELEASEDIR/CD
|
date >$RELEASEDIR/CD
|
||||||
( cd $RELEASEDIR && find . -name CVS | xargs rm -rf )
|
|
||||||
#echo " * Making source .tgz for on ISO filesystem"
|
|
||||||
#( cd $RELEASEDIR/usr/src && tar cf - . | gzip > $CDFILES/MINIXSRC.TGZ )
|
|
||||||
echo " * Chroot build"
|
echo " * Chroot build"
|
||||||
chroot $RELEASEDIR '/bin/sh -x /usr/src/tools/chrootmake.sh' || exit 1
|
chroot $RELEASEDIR '/bin/sh -x /usr/src/tools/chrootmake.sh' || exit 1
|
||||||
echo " * Chroot build done"
|
echo " * Chroot build done"
|
||||||
cp issue.install $RELEASEDIR/etc/issue
|
cp issue.install $RELEASEDIR/etc/issue
|
||||||
umount $TMPDISK || exit
|
umount $TMPDISK || exit
|
||||||
umount $RAM || exit
|
umount $RAM || exit
|
||||||
cp $RAM $ROOTIMAGE
|
dd if=$RAM of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS
|
||||||
make programs image
|
make programs image
|
||||||
(cd ../boot && make)
|
(cd ../boot && make)
|
||||||
make image || exit 1
|
make image || exit 1
|
||||||
|
@ -78,5 +80,5 @@ cp $IMAGE $CDFILES/bootflp.img
|
||||||
cp release/cd/* $CDFILES
|
cp release/cd/* $CDFILES
|
||||||
writeisofs -l MINIX -b $IMAGE $CDFILES $ISO || exit 1
|
writeisofs -l MINIX -b $IMAGE $CDFILES $ISO || exit 1
|
||||||
echo "Appending Minix root and usr filesystem"
|
echo "Appending Minix root and usr filesystem"
|
||||||
cat $ISO $ROOTIMAGE $TMPDISK | gzip >$ISOGZ || exit 1
|
( cat $ISO $ROOTIMAGE ; dd if=$TMPDISK bs=$BS count=$USRBLOCKS ) | gzip -9 >$ISOGZ || exit 1
|
||||||
ls -al $ISOGZ
|
ls -al $ISOGZ
|
||||||
|
|
Loading…
Reference in a new issue