Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bb22244811c706138c2bc365e200ffb66528a3df)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bb22244811c706138c2bc365e200ffb66528a3df)
  • Date: Tue, 13 Sep 2011 17:43:28 -0500

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

FUNCTIONS | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit bb22244811c706138c2bc365e200ffb66528a3df
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

FUNCTIONS: Replace prepare_scm_queries with prepare_select_branch

diff --git a/FUNCTIONS b/FUNCTIONS
index 3222e18..0eb70eb 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -665,27 +665,27 @@ function default_kde3_build() {


#---
-## Query user about using scm version and save information so it can be
-## used in DETAILS. Information is saved in SPELL_NAME_SCM and
-## SPELL_NAME_SCM_AUTOUPDATE for SPELL=spell-name
+## Select SCM branch. If no parameter is given, it assumes a single scm
branch.
##
-## For now manual source of FUNCTIONS in PREPARE is needed:
-## . ${GRIMOIRE}/FUNCTIONS &&
-## prepare_scm_queries
+## Saves selected branch in ${SPELL}_BRANCH, and auto-update setting on
+## ${SPELL}_AUTOUPDATE.
+##
+## Usage:
+## . ${GRIMOIRE}/FUNCTIONS &&
+## prepare_select_branch [branch] ...
#---
-function prepare_scm_queries() {
- local up_spell_name=$(get_up_spell_name) &&
-
- local scm_var scm_autoupdate_var
- scm_var="${up_spell_name}_SCM" &&
- scm_autoupdate_var="${up_spell_name}_SCM_AUTOUPDATE" &&
+function prepare_select_branch() {
+ local spell=$(get_up_spell_name) &&
+ local branch="$spell"_BRANCH &&

- config_query $scm_var "Build the SCM version of $SPELL?" n
+ if [[ $# > 1 ]]; then
+ config_query_list $branch "Select one of the available branches:" "$@"
+ else
+ eval $branch=\""${1:-scm}"\"
+ fi &&

- if [[ ${!scm_var} == "y" ]]
- then
- config_query $scm_autoupdate_var \
- "Automatically update $SPELL on system-update?" n
+ if [[ "${!branch/-*}" = scm ]]; then
+ config_query "$spell"_AUTOUPDATE 'Automatically update on every system
update?' n
fi
}




  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (bb22244811c706138c2bc365e200ffb66528a3df), Ismael Luceno, 09/13/2011

Archive powered by MHonArc 2.6.24.

Top of Page