[SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (d7005d31dfd2eadf03922d65b10a37468f19e770)

Justin Boffemmyer scm at sourcemage.org
Tue Jan 13 16:33:11 EST 2009


GIT changes to test cauldron by Justin Boffemmyer <flux at sourcemage.org>:

 scripts/spellcaster.sh |   10 ++++++++++
 1 files changed, 10 insertions(+)

New commits:
commit d7005d31dfd2eadf03922d65b10a37468f19e770
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    scripts/spellcaster.sh: need msg inside subscript
    
    The script that is created inside the build chroot by spellcaster.sh
    employs msg, like spellcaster itself does, but didn't have the function
    defined internal to the subscript. The definition has been added, and
    the QUIET variable exported so subshells can see it.

diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index 31b0af3..34a9217 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -187,6 +187,13 @@ function prepare_target() {
 	# generate basesystem casting script inside of TARGET
 	cat > "$TARGET"/build_spells.sh <<-'SPELLS'
 
+	function msg() {
+		if [[ -z $QUIET ]]
+		then
+			echo $1 >&2
+		fi
+	}
+
 	if [[ -n $CAULDRON_CHROOT && $# -eq 0 ]]
 	then
 
@@ -243,6 +250,9 @@ function prepare_target() {
 SPELLS
 
 	chmod a+x "$TARGET"/build_spells.sh
+	# export the QUIET variable so subshells (like build_spells) can make
+	# use of it
+	export QUIET
 }
 
 function install_kernel() {



More information about the SM-Commit mailing list