sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (7b4e1d197247ce54d3ec6865961734abff7a7629)
- From: Jaka Kranjc <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (7b4e1d197247ce54d3ec6865961734abff7a7629)
- Date: Wed, 14 Nov 2007 12:23:26 -0600
GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:
ChangeLog | 2 ++
usr/sbin/confmeld | 19 +++++++++++++++++--
var/lib/sorcery/modules/libstate | 2 +-
3 files changed, 20 insertions(+), 3 deletions(-)
New commits:
commit 7b4e1d197247ce54d3ec6865961734abff7a7629
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
confmeld: added parameter parsing and enabled the display of help
commit c79f5742b73b65f2a7b5409b2c60ba125550433f
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
removed a stray '' with no effect
diff --git a/ChangeLog b/ChangeLog
index a50dbab..443d571 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,9 +3,11 @@
files there #11831
* libdepends: removed extra space from the subdepends message #13992
* libstate: fixed strictness of subdependency matching on removal
#13993
+ removed a stray '' with no effect
* libtrack: disable staging when /dev/null is not a device #13315
* api2: improved the message when castfs fails the sanity check
* libstate, libtrack, url_http, url_git, url_git_http: fixed comments
+ * confmeld: added parameter parsing and enabled the display of help
2007-10-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libdepends: fixed some more quoting regressions since stable. Should
diff --git a/usr/sbin/confmeld b/usr/sbin/confmeld
index 530594e..9c479b8 100755
--- a/usr/sbin/confmeld
+++ b/usr/sbin/confmeld
@@ -14,11 +14,11 @@ function help()
Melds the staged config files from $CONFIG_STAGE_DIRECTORY
-Example: confmeld
+Example: confmeld
Optional Parameters:
- None at the moment
+none
EOF
exit 1
@@ -81,6 +81,19 @@ function parse_stage_config_path()
eval "$4=\"$__path\""
}
+function process_parameters()
+{
+ while [[ -n $1 ]]; do
+ if [[ ${1:0:1} == "-" ]]; then
+ case "$1" in
+ --help|-h) help ;;
+ *) help ;;
+ esac
+ else shift 1
+ fi
+ done
+}
+
#--------------------------------------------------------------------
## Main
##
@@ -93,6 +106,8 @@ function main()
local last_spell=""
local last_sdate=""
+ process_parameters "$@"
+
for file in $(all_config_files)
do
parse_stage_config_path $file spell sdate target &&
diff --git a/var/lib/sorcery/modules/libstate
b/var/lib/sorcery/modules/libstate
index 9f59f28..97f1e6c 100755
--- a/var/lib/sorcery/modules/libstate
+++ b/var/lib/sorcery/modules/libstate
@@ -612,7 +612,7 @@ function real_spell_held() {
## @return 0 if the given spell's status is "installed" or "held"
#---------------------------------------------------------------------
function real_spell_ok() {
- ''local res="$( query_spell_status $1 )"
+ local res="$( query_spell_status $1 )"
[ "$res" == "installed" ] || [ "$res" == "held" ]
}
- [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (7b4e1d197247ce54d3ec6865961734abff7a7629), Jaka Kranjc, 11/14/2007
Archive powered by MHonArc 2.6.24.