Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <smgl AT lynxlynx.info>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to test cauldron by Justin Boffemmyer (ba4167a81b61e7e111a411ffb4f4a9e1e9a63913)
  • Date: Thu, 25 Dec 2008 18:43:05 +0100

On Thursday 25 of December 2008 18:10:18 Justin Boffemmyer wrote:
> +# check to make sure that the chroot has sorcery set to do caches
> +function sanity_check() {
> + local config="$TARGET/etc/sorcery/local/config"
> + local arch=
> + local choice=
> +
> + if [[ -e "$config" ]]
> + then
> + arch=$(grep 'ARCHIVE=' "$config" | cut -d= -f2 | sed 's/"//g')
> + if [[ -n $arch && $arch != "on" ]]
It would be simpler to do something like:
arch=$(. $config; echo $ARCHIVE)

That would also work for newer sorceries (currently devel), which store
options as fallbacks, so they can be overriden from the environment
(ARCHIVE=${ARCHIVE:-on}). Storing the option like that in the older sorceries
would on the other hand ignore the user's choice and always use the default
value.

For the same reason, the modification of the config is better done with
sorcery:
modify_config $config ARCHIVE on

> + if [[ -n $CAULDRON_CHROOT && $# -eq 0 ]]
> + then
> + # cast basic/required spells
> + /usr/sbin/cast $(tr '\n' ' ' </rspells)
> + exit $?
This makes the rest of the script unreachable. You likely meant "|| exit $?".
Same for the ISO and OPTIONAL one.

LP
--
We cannot command nature except by obeying her. --Sir Francis Bacon
Have a sourcerous day! www.sourcemage.org

Attachment: signature.asc
Description: This is a digitally signed message part.




Archive powered by MHonArc 2.6.24.

Top of Page