From 6d06a6a354d32ba705671306b0ba911b77a51f9f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 23 Mar 2010 14:20:45 -0400 Subject: [PATCH] Add catalyst.conf path replacement to rebuild-kernel.sh 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 | 13 +++++++++++-- mainfiles/{catalyst.conf-x86 => catalyst.conf} | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) rename mainfiles/{catalyst.conf-x86 => catalyst.conf} (97%) diff --git a/buildscripts/rebuild-kernel.sh b/buildscripts/rebuild-kernel.sh index 546bd38..46c6013 100755 --- a/buildscripts/rebuild-kernel.sh +++ b/buildscripts/rebuild-kernel.sh @@ -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: /systemrescuecd--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) diff --git a/mainfiles/catalyst.conf-x86 b/mainfiles/catalyst.conf similarity index 97% rename from mainfiles/catalyst.conf-x86 rename to mainfiles/catalyst.conf index 2498725..38ff2c2 100644 --- a/mainfiles/catalyst.conf-x86 +++ b/mainfiles/catalyst.conf @@ -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" -- 2.26.2