sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by Bor Kraljič (a0b6b08836b48ce9c0dc83b66a0123ab78f4ae1e)
- From: Bor Kraljič <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by Bor Kraljič (a0b6b08836b48ce9c0dc83b66a0123ab78f4ae1e)
- Date: Tue, 13 Sep 2011 02:32:48 -0500
GIT changes to master grimoire by Bor Kraljič <pyrobor AT ver.si>:
ChangeLog | 1 +
FUNCTIONS | 39 +++++++++++++++++++++++++++++++++++++--
2 files changed, 38 insertions(+), 2 deletions(-)
New commits:
commit a0b6b08836b48ce9c0dc83b66a0123ab78f4ae1e
Author: Bor Kraljič <pyrobor AT ver.si>
Commit: Bor Kraljič <pyrobor AT ver.si>
FUNCTIONS: added function prepare_scm_queries & get_up_spell_name
diff --git a/ChangeLog b/ChangeLog
index eea99c8..b0363fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2011-09-13 Bor Kraljič <pyrobor AT ver.si>
* audio-players/qmmp: new spell: Qt4-based Multimedia Player
+ * FUNCTIONS: added function prepare_scm_queries & get_up_spell_name
2011-09-13 Vlad Glagolev <stealth AT sourcemage.org>
* apache.gpg: added public key B55D9977 (William A. Rowe, Jr.
diff --git a/FUNCTIONS b/FUNCTIONS
index 2b2bedc..18cddf1 100755
--- a/FUNCTIONS
+++ b/FUNCTIONS
@@ -663,13 +663,48 @@ 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
+##
+## For now manual source of FUNCTIONS in PREPARE is needed:
+## . ${GRIMOIRE}/FUNCTIONS &&
+## prepare_scm_queries
+#---
+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" &&
+
+ config_query $scm_var "Build the SCM version of $SPELL?" n
+
+ if [[ ${!scm_var} == "y" ]]
+ then
+ config_query $scm_autoupdate_var \
+ "Automatically update $SPELL on system-update?" n
+ fi
+}
+
+#---
+## Get uppercase spell name with _ instead of -
+#---
+function get_up_spell_name() {
+ local spell=${1:-$SPELL}
+ local up_spell_name=$(echo $spell | tr "a-z" "A-Z") &&
+ local up_spell_name=$(echo $up_spell_name | tr "-" "_") &&
+ echo $up_spell_name
+}
+
# Move SPELL_OPTS to OPTS
# basicly generic OPTS="$SPELL_OPTS $OPTS"
function prepare_opts() {
# this is here so that config_query_option can be used without
# extra junk
- local up_spell_name=$(echo $SPELL | tr "a-z" "A-Z") &&
- local up_spell_name=$(echo $up_spell_name | tr "-" "_") &&
+ local up_spell_name=$(get_up_spell_name) &&
local tempopts="${up_spell_name}_OPTS" &&
OPTS="${!tempopts} $OPTS"
}
- [SM-Commit] GIT changes to master grimoire by Bor Kraljič (a0b6b08836b48ce9c0dc83b66a0123ab78f4ae1e), Bor Kraljič, 09/13/2011
Archive powered by MHonArc 2.6.24.