Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] Spell branches

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael.luceno AT gmail.com>
  • To: sm-discuss AT lists.ibiblio.org <sm-discuss AT lists.ibiblio.org>
  • Subject: [SM-Discuss] Spell branches
  • Date: Sun, 11 Sep 2011 22:47:14 -0300

Some spells support multiple branches. I would like to remove the
duplication to certain extent, by adding a new function that would
take a list of branches, query which one the user wants and if it
should be updated automatically (if applicable).

Something like:

function select_branch() {
local spell="$1" tmp &&
shift &&

if [[ $# > 1 ]]; then
config_query_list "$spell"_BRANCH \
"Select one of the available branches:" "$@" &&
eval tmp=\$"$spell"_BRANCH
else
eval "$spell"_BRANCH=\""$1"\" &&
tmp="$1"
fi &&

if [[ "${tmp/-*}" = scm ]]; then
config_query "$spell"_SCM_AUTOUPDATE \
'Update on every system update?' n
fi
}


Opinions?

Attachment: signature.asc
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page