From 3d5c5df8853e432b9f534d92ef98eaddfb9e4e15 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Mon, 22 Mar 2004 22:03:32 +0000 Subject: [PATCH] added a -source options to embed the ROCK Linux source as well as all known download files onto the ISO (as we had before the 1.7 rewrite - and requested by many people, especially on CeBIT) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2592 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Create-ISO | 34 +++++++++++++++++++++++++++++----- scripts/Download | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/scripts/Create-ISO b/scripts/Create-ISO index 093428b77..98d34c249 100755 --- a/scripts/Create-ISO +++ b/scripts/Create-ISO @@ -15,14 +15,15 @@ # # SCRIPT script-name args Run given script for each image # -# Intended for image post-processing - like needed for IBM RS/6k boot -# blessing. The first attached argument is the CD number and the second -# the image file. +# Intended for image post-processing. The first attached argument is the CD +# number and the second the image file. # +eval `grep rockver scripts/parse-config` + if [ $# -eq 0 ] ; then echo - echo "Usage: $0 [ -size MB ] [ -mkdebug] ISO-Prefix \\" + echo "Usage: $0 [ -size MB ] [ -source ] [ -mkdebug ] ISO-Prefix \\" echo " ${0//?/ } Config [ Config [ .. ] ]" echo echo "E.g.: $0 mycdset install generic" @@ -32,12 +33,15 @@ fi # default disk-size is 600 MB dsize=$(( 600 * 1024 )) +src=0 mkdebug=0 while true ; do case "$1" in -size) dsize=$(( $2 * 1024 )) ; shift ; shift ;; + -source) + src=1 ; shift ;; -mkdebug) mkdebug=1 ; shift ;; -* | '') @@ -166,12 +170,32 @@ while read type from to ; do fi done < $dat +if [ $src = 1 ] ; then + echo "$spacer embedding source." + + ./scripts/Create-SrcTar + + for x in Documentation/* rock-src-$rockver.tar.bz2 ; do + [ ! -d $x ] && add $x ${x/Documentation\/} + done + + while read from ; do + # adaptions of the sed exp need to propagated into Download, too + from="`echo $from | sed 's,\.\(t\?\)\(gz\|Z\)$,.\1bz2,'`" + if [ -e $from ] ; then + add $from $from + else + echo "WARNING: File $from is missing!" + fi + done < <( ./scripts/Download -list ) +fi + echo -n > $index for x in 0 $disks ; do dd=disk_${x}_data for y in ${!dd} `cat ${pathspec}_${x} 2> /dev/null` ; do to=${y%=*} ; from=${y#*=} - if [ -d $from ] ; then + if [ -e $from ] ; then find $from -printf "disk$x $to%P\\n" >> $index else echo "disk$x $to" >> $index diff --git a/scripts/Download b/scripts/Download index fd8f1425a..2fa042f89 100755 --- a/scripts/Download +++ b/scripts/Download @@ -270,7 +270,7 @@ download_file() { gzfile="$1" ; location="$2" ; cksum="$3" # Make src directory for creating tar balls mkdir -p src/ - # Tar ball file name: + # Tarball file name: (if you change this one - also adapt Create-ISO) bzfile="`echo "$gzfile" | sed 's,\.\(t\?\)\(gz\|Z\)$,.\1bz2,'`" # Lock file name: lkfile="src/down.lockfile.`echo $bzfile | tr / -`"