Skip to Content.
Sympa Menu

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

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 (e36265a5136248432de0da08bbcd3711e2426605)
  • Date: Thu, 25 Dec 2008 17:05:07 -0600

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

scripts/spellcaster.sh | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)

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

scripts/spellcaster.sh: fixes

Fixed script handling of sorcery config variables and return values/exit
code usage. Also added a missing chmod.

diff --git a/scripts/spellcaster.sh b/scripts/spellcaster.sh
index 79505f9..9f98d81 100755
--- a/scripts/spellcaster.sh
+++ b/scripts/spellcaster.sh
@@ -72,7 +72,7 @@ function sanity_check() {

if [[ -e "$config" ]]
then
- arch=$(grep 'ARCHIVE=' "$config" | cut -d= -f2 | sed 's/"//g')
+ arch="$(source "$config" && echo $ARCHIVE)"
if [[ -n $arch && $arch != "on" ]]
then
echo "Error! TARGET sorcery does not archive!" >&2
@@ -81,7 +81,8 @@ function sanity_check() {

if [[ $choice == 'y' ]]
then
- sed -i 's/ARCHIVE=.*/ARCHIVE="on"/' "$config"
+ . "$TARGET/var/lib/sorcery/modules/libstate"
+ modify_config $config ARCHIVE on
else
exit 2
fi
@@ -113,15 +114,13 @@ function prepare_target() {
if [[ -n $CAULDRON_CHROOT && $# -eq 0 ]]
then
# cast basic/required spells
- /usr/sbin/cast $(tr '\n' ' ' </rspells)
- exit $?
+ /usr/sbin/cast $(tr '\n' ' ' </rspells) || exit $?

# make a list of the caches to unpack for system
for spell in $(</rspells)
do
echo $spell-$(gaze -q installed $spell) >> /sys-list
- done
- [[ $? -eq 0 ]] || exit 42
+ done || exit 42
fi
BASE

@@ -131,15 +130,13 @@ BASE
if [[ -n $CAULDRON_CHROOT && $# -eq 0 ]]
then
# cast optional spells
- /usr/sbin/cast $(tr '\n' ' ' </ispells)
- exit $?
+ /usr/sbin/cast $(tr '\n' ' ' </ispells) || exit $?

# make a list of the caches to unpack for iso
for spell in $(</ispells)
do
echo $spell-$(gaze -q installed $spell) >> /iso-list
- done
- [[ $? -eq 0 ]] || exit 42
+ done || exit 42
fi
ISO

@@ -149,24 +146,22 @@ ISO
if [[ -n $CAULDRON_CHROOT && $# -eq 0 ]]
then
# cast optional spells
- /usr/sbin/cast $(tr '\n' ' ' </ospells)
- exit $?
+ /usr/sbin/cast $(tr '\n' ' ' </ospells) || exit $?

# make a list of the caches to unpack for iso
for spell in $(</ospells)
do
echo $spell-$(gaze -q installed $spell) >> /opt-list
- done
- [[ $? -eq 0 ]] || exit 42
+ done || exit 42

# dispel the optional spells, so that we have only their
cache files
# available
- /usr/sbin/dispel $(tr '\n' ' ' </ospells)
- exit $?
+ /usr/sbin/dispel $(tr '\n' ' ' </ospells) || exit $?
fi
OPTIONAL

chmod a+x "$TARGET"/build_base.sh
+ chmod a+x "$TARGET"/build_iso.sh
chmod a+x "$TARGET"/build_optional.sh
}




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

Archive powered by MHonArc 2.6.24.

Top of Page