On Tue, Apr 25, 2000 at 09:58:02PM -0700, Kenny Graunke wrote:
> 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        
> 

This loop does not work very well, since rpmlist only has the main name of the
package listed and you will for example get all packages that start with perl
moved, even though some of them should stay below the cd2 directory.
Running this, the ISO file for cd1 ended up at about 710 MB.
Try fitting that onto a CD!


> # 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


-- 
Jan Lindheim             [EMAIL PROTECTED]
M.S. 158-79 Caltech
Pasadena, CA 91125 USA   
Tel: (626) 395-3926, FAX: (626) 584-5917

Reply via email to