#!/bin/bash # Steve Slaven - http://hoopajoo.net VERSION="mktoms v0.80" #URL=http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/ URL=http://ftp.sunsite.utk.edu/ftp/pub/mini-linux/tomsrtbt/ if [ ! -z "$1" ] then URL=$1 fi OUTDIR=toms FURL=`echo $URL | sed s/^http:..//` FURL=`echo $FURL | sed s/^ftp:..//` function argg { echo "Argh: $*" exit } echo "Creating output directory: $OUTDIR" mkdir -p $OUTDIR || argg Unable to make $OUTDIR cd $OUTDIR # The download files are in files, we'll put the ISO in the main OUT directory mkdir files pushd files echo "Downloading tomsrtbt files..." wget -m -np $URL || argg Unable to download files, do you have wget? mv $FURL/* . # The el-torito boot image will go here, as toms.boot echo "Setting up boot image..." mkdir boot bzcat toms*ElTorito* > boot/toms.boot || argg Unable to decompress el torito image popd # Now make the ISO echo "Beginning bootable ISO creation..." HOSTNAME=`hostname` mkisofs -o toms.iso -b boot/toms.boot -c boot/toms.cat -J -R -P "$URL" -p "$VERSION - Steve Slaven, http://hoopajoo.net" -A "Toms Rootboot (tomsrtbt) by $USER on $HOSTNAME" files/ || argg Unable to make ISO