#!/bin/bash # # This is a simple script to complete the generation of a # set of CD's containing the current updates. # # It assumes that the ./check2updates script has been run, and that # the master RPM files contain all the latest stuff. # # usage: ./makecd [clean] # MY_DIR=`pwd` TMP_DIR="$HOME/tmp" # couple quick integrity checks if [ ! -e $MY_DIR/myRPMS ]; then echo "Could not find the \"myRPMS\" directory." exit 1 fi if [ ! -e $MY_DIR/myRPMSextra ]; then echo "Could not find the \"myRPMSextra\" directory." exit 1 fi if [ ! -e $MY_DIR/myCD.conf ]; then echo "Could not find the CD Configuration file." exit 1 fi if [ ! -e $MY_DIR/cd ]; then echo "Could not find the \"cd\" directory." exit 1 fi # first, get rid of the old stuff echo "Removing old stuff..." if [ "XXX$1" != "XXX" ]; then # clean up cache area files echo "Removing cache filesfrom $TMP_DIR." rm -rf $TMP_DIR/9.2 rm -rf $TMP_DIR/build rm -rf $TMP_DIR/.mkcd* rm -rf $TMP_DIR/.build_hdlist* rm -rf $MY_DIR/build fi # clean up from the last run rm -rf $MY_DIR/iso rm -f $MY_DIR/myCD.script rm -f $MY_DIR/progress.log # make sure CD base image is clean rm -f $MY_DIR/cd/Boot/boot.cat rm -f $MY_DIR/cd/isolinux/boot.cat rm -f $MY_DIR/cd/pkg*.idx rm -f $MY_DIR/cd/Mandrake/base/compss rm -f $MY_DIR/cd/Mandrake/base/depslist.ordered rm -f $MY_DIR/cd/Mandrake/base/hdlist*.cz rm -f $MY_DIR/cd/Mandrake/base/provides rm -f $MY_DIR/cd/Mandrake/base/synth* rm -f $MY_DIR/cd/.rr_moved # remove any disk content files rm -f $MY_DIR/myRPMS/*.cz rm -f $MY_DIR/myRPMSextra/*.cz echo "Now making ISO images." mkcd -s $MY_DIR/myCD.conf --verbose 1 -p myCD.script -m 11 &> $MY_DIR/progress.log echo "Done, the ISOs are located at $MY_DIR/iso/9.2." echo "and, the verbose diagnostic information is in the file $MY_DIR/progress.log" exit 0