Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (f58fbbe4647a3d34264881821300c19ceb725f39)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (f58fbbe4647a3d34264881821300c19ceb725f39)
  • Date: Mon, 8 Dec 2008 10:32:56 -0600

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

scripts/spellcaster.sh | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit f58fbbe4647a3d34264881821300c19ceb725f39
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/spellcaster.sh: formatting and comments

Reformmatted to fit better inside 80 chars and added comments to
describe what the script is doing.

commit 8e4af98a25d5aeccf43f4ce22a08e720fd59d407
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/spellcaster.sh: rm extra $()

Removed the $() from surrounding the grep call, as this was unnecessary
and spurious.

commit 1f467cb870d0f41f30b00187dd4a88f64f619804
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/spellcaster.sh: fix dispel path

Fixed typo dispel path /usr/bin/dispel -> /usr/sbin/dispel.

commit 92290e255c9beeab8be52082ac47c736eaee2a4e
Author: Andrew Stitt <acedit AT armory.com>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

scripts/spellcast.sh: bug fixes

fix path to cast command
fix kernel config file copy command
fix parameter comparison syntax
copy script to chroot

(cherry picked from commit 0015aa75a2d28cb3e0fc70a1fb198903705e1cfb)

diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index dda6c18..062d3b0 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -9,14 +9,14 @@ then
if [[ $CAULDRON_CAST = y ]]
then
# cast all spells
- /usr/bin/cast $(tr '\n' ' ' </"$rspells") &&
- /usr/bin/cast $(tr '\n' ' ' </"$ospells")
+ /usr/sbin/cast $(tr '\n' ' ' </"$rspells") &&
+ /usr/sbin/cast $(tr '\n' ' ' </"$ospells")

elif [[ $CAULDRON_DISPEL = y ]]
then
# dispel the optional spells, so that we have only their
cache files
# available
- /usr/bin/dispel $(tr '\n' ' ' </"$ospells")
+ /usr/sbin/dispel $(tr '\n' ' ' </"$ospells")
fi

exit $?
@@ -112,15 +112,26 @@ then
fi

# Copy necessary files to the target and chroot
-$(grep -q linux "$CAULDRONDIR/{$rspells,$ospells}") && cp
"$CAULDRONDIR/config.$TYPE" "$TARGET/etc/sorcery/local/kernel.config"
-[[ CAULDRON_CAST = y ]] && cp "$CAULDRONDIR/$rspells" "$TARGET"/
+grep -q '^linux$' "$CAULDRONDIR/$rspells" "$CAULDRONDIR/$ospells" &&
+ cp "$CAULDRONDIR/config-2.6" "$TARGET/etc/sorcery/local/kernel.config"
+
+# Copy the list of spells needed for casting into the TARGET if casting
+[[ $CAULDRON_CAST = y ]] && cp "$CAULDRONDIR/$rspells" "$TARGET"/
+
+# ospells needs to be there whether casting or dispelling
cp "$CAULDRONDIR/$ospells" "$TARGET"/
+
+# copy the script into the TARGET so it can do the casting/dispelling
+cp "$0" "$TARGET"/
+
+# chroot and run the script inside the TARGET
"$MYDIR/cauldronchr.sh" -d "$TARGET" /"$(basename $0)"

# Clean up the target
-[[ CAULDRON_CAST = y ]] && rm "$TARGET/$rspells"
+[[ $CAULDRON_CAST = y ]] && rm "$TARGET/$rspells"
rm "$TARGET/$ospells"
-[[ -e "$TARGET/etc/sorcery/local/kernel.config" ]] && rm
"$TARGET/etc/sorcery/local/kernel.config"
+[[ -e "$TARGET/etc/sorcery/local/kernel.config" ]] &&
+ rm "$TARGET/etc/sorcery/local/kernel.config"
rm "$TARGET/$(basename $0)"

unset rspells



  • [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (f58fbbe4647a3d34264881821300c19ceb725f39), Justin Boffemmyer, 12/08/2008

Archive powered by MHonArc 2.6.24.

Top of Page