Sorry...it didn't attach... : (
# Linux-Mandrake ISO CD Creation Script
# You MUST change these variables for your particular configuration:

# Set this to the location of where you want to download Linux-Mandrake to.
mdkLOCALROOT=/mnt/disk
# Set these to the location where you want your ISO images to be created.
mdkISO1DIR=/output/directory
mdkISO2DIR=/output/directory
# Set this to 1 to download Linux-Mandrake.
mdkMIRROR=0
# Set these to your FTP mirror and directory, respectively:
mdkFTPSITE=ftp.somewhere.org
mdkFTPDIR=/some/dir/hydrogen

# You should not have to change anything below this point.

#mirror from ftp preserving permissions and symlinks
cd $mdkLOCALROOT/mirror
[ "$mdkMIRROR" = "1" ] && lftp -c "open $mdkFTPSITE\; cd $mdkFTPDIR\; mirror"

# create new directories to separate the rpms for the two cds
mkdir -p $mdkLOCALROOT/tmp
mkdir -p $mdkLOCALROOT/cd2
mkdir -p $mdkLOCALROOT/cd2/Mandrake/RPMS2

# move all files in the directory for CD2
mv $mdkLOCALROOT/mirror/Mandrake/RPMS/* $mdkLOCALROOT/cd2/Mandrake/RPMS2/  
mv $mdkLOCALROOT/mirror $mdkLOCALROOT/cd1
    
# move the apropriate files in the directory for first CD
for i in `cat $mdkLOCALROOT/cd1/Mandrake/base/rpmslist`
do
    mv $mdkLOCALROOT/cd2/Mandrake/RPMS2/$i* $mdkLOCALROOT/cd1/Mandrake/RPMS/ 
done        

# Do a little prep to get the boot images to the start of the first disk
mv $mdkLOCALROOT/cd1/images $mdkLOCALROOT/tmp

# create the first iso image
mkisofs -R \
        -o $mdkISO1DIR/hydrogen.iso \
        -b images/cdrom.img \
        -c images/.catalog \
        $mdkLOCALROOT/tmp \
        $mdkLOCALROOT/cd1

# move the images back where they belong
mv $mdkLOCALROOT/tmp/images $mdkLOCALROOT/cd1/
rmdir $mdkLOCALROOT/tmp

# create the second iso image
mkisofs -R \
        -o $mdkISO2DIR/hydrogen_extentions.iso \
        $mdkLOCALROOT/cd2

Reply via email to