Add catalyst.conf path replacement to rebuild-kernel.sh
authorW. Trevor King <wking@drexel.edu>
Tue, 23 Mar 2010 18:20:45 +0000 (14:20 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 23 Mar 2010 18:30:04 +0000 (14:30 -0400)
Also renamed catalyst.conf-x86 to catalyst.conf.  There's nothing x86
specific in there, and there is no alternative option for sparc.

Curiously, the old rebuild-kernel.sh didn't seem to use this config
file at all...

buildscripts/rebuild-kernel.sh
mainfiles/catalyst.conf [moved from mainfiles/catalyst.conf-x86 with 97% similarity]

index 546bd38d4e4fd042ed47cb29c0504abcca55352b..46c60133b2018718eeaf4339a1c628fb0aca69e8 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+set -o pipefail
+set -o errexit
+
 PROG="${0}"
 ISODIR=/worksrc/isofiles
 REPOSRC=/worksrc/sysresccd-src
@@ -21,7 +24,7 @@ Options:
                      <isodir>/systemrescuecd-<arch>-current.iso
  -r REPOSRC        Location of git systemrescuecd repo ($REPOSRC)
  -b REPOBIN        ? ($REPOBIN)
- -m CATALYSTDIR    Set catalyst's output directory ($CATALYSTDIR)
+ -c CATALYSTDIR    Set catalyst's output directory ($CATALYSTDIR)
 
 Distributed under the GNU Public License version 2 - http://www.sysresccd.org
 EOF
@@ -72,7 +75,13 @@ SPEC=$(cat ${REPOSRC}/mainfiles/sysresccd-stage2-${IMAGENAME}.spec \
     | sed "s!REPOSRC!${REPOSRC}!" \
     | sed "s!REPOBIN!${REPOBIN}!" \
     )
-(cd ${REPOSRC}/mainfiles ; nice catalyst -a -f <(echo "$SPEC") )
+CONF=$(cat ${REPOSRC}/mainfiles/catalyst.conf \
+    | sed "s!ISODIR!${ISODIR}!" \
+    | sed "s!REPOSRC!${REPOSRC}!" \
+    | sed "s!REPOBIN!${REPOBIN}!" \
+    | sed "s!CATALYSTDIR!${CATALYSTDIR}!" \
+    )
+(cd ${REPOSRC}/mainfiles ; nice catalyst -a -f <(echo "$SPEC") -c <(echo "$CONF") )
 
 targetdir="${REPOBIN}/overlay-squashfs-x86/${LIBDIR}/modules"
 rootkernel=$(ls -d ${CATALYSTDIR}/builds/default/livecd-stage2-${ARCH}-*-${KERTYPE}/isolinux)
similarity index 97%
rename from mainfiles/catalyst.conf-x86
rename to mainfiles/catalyst.conf
index 2498725b97b0465d92a4a428cb16c30e3b4c1e4b..38ff2c20b174df42ab5ca5823c08f2618c87f54d 100644 (file)
@@ -37,7 +37,7 @@ sharedir="/usr/lib/catalyst"
 
 # storedir specifies where catalyst will store everything that it builds, and
 # also where it will put its temporary files and caches.
-storedir="/worksrc/catalyst"
+storedir="CATALYSTDIR"
 
 # portdir specifies the source portage tree used by the snapshot target.
 # portdir="/usr/portage"
@@ -63,4 +63,4 @@ digests="md5 sha1"
 # GENTOO_MIRRORS, or any other environment variables needed for building.
 # The envscript file sets environment variables like so:
 # export FOO="bar"
-envscript="/worksrc/sysresccd-src/mainfiles/catalyst-env.sh"
+envscript="REPOSRC/mainfiles/catalyst-env.sh"