sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8b59bf46989d31b00621a5c5e1d42177dc80c57)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8b59bf46989d31b00621a5c5e1d42177dc80c57)
- Date: Fri, 9 Jan 2015 17:44:08 -0600
GIT changes to master sorcery by Ismael Luceno <ismael AT sourcemage.org>:
ChangeLog | 3 ++
usr/sbin/gaze | 83
+++++++++++++++++++++++++---------------------------------
2 files changed, 40 insertions(+), 46 deletions(-)
New commits:
commit c8b59bf46989d31b00621a5c5e1d42177dc80c57
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
gaze: Make gaze versions take multiple arguments
This makes "gaze versions" act like "gaze version".
diff --git a/ChangeLog b/ChangeLog
index 5db557f..64d22c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2015-01-09 Ismael Luceno <ismael AT sourcemage.org>
+ * gaze: Made gaze versions take multiple arguments
+
2015-01-06 Ismael Luceno <ismael AT sourcemage.org>
* libcodex: Fixed version indexing for scm versions
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 3a96a21..00b1faa 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -1202,55 +1202,46 @@ function gaze_show_version() {
##
#---------------------------------------------------------------------
function gaze_show_versions() {
-
- local SPELL=$1
-
- if ! codex_does_spell_exist $SPELL
- then return 1
- fi
-
(
-
- echo "Grimoire|Section|Spell|Grimoire Version|Installed Version"
- echo "--------|-------|-----|----------------|-----------------"
-
- #saving them, since they will be overwritten later
- if tablet_find_spell_dir "$SPELL" tablet; then
- # TODO: change this if it will be stored in the less volatile
state/packages file
- tablet_get_grimoire_name $tablet installed_grimoire
- fi
- installed=$(installed_version $SPELL)
-
- for grimoire in $(codex_get_all_grimoires)
- do
- if SPELL_DIRECTORY=$(codex_cache_spell_lookup $SPELL $grimoire)
- then
- codex_set_current_spell $SPELL_DIRECTORY
-
- # old states don't have the name stored so fall back to similar old
- # broken behaviour where the first matching grimoire was used
- [[ -z $installed_grimoire ]] && installed_grimoire=$GRIMOIRE_NAME
-
- if [[ $GRIMOIRE_NAME == $installed_grimoire ]]
- then
- echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|${installed:="-"}"
- else
- echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|-"
- fi
-
- else
- # handle also (re)moved spells
- smgl_basename "$grimoire" name
- if [[ $name == $installed_grimoire ]]; then
- echo "$name|-|-|-|$installed"
- else
- echo "$name|-|-|-|-"
+ echo "Grimoire|Section|Spell|Grimoire Version|Installed Version"
+ echo "--------|-------|-----|----------------|-----------------"
+ for SPELL in "$@"; do
+ codex_does_spell_exist $SPELL || continue
+ #saving them, since they will be overwritten later
+ if tablet_find_spell_dir "$SPELL" tablet; then
+ # TODO: change this if it will be stored in the less volatile
state/packages file
+ tablet_get_grimoire_name $tablet installed_grimoire
fi
- fi
- done
-
+ installed=$(installed_version $SPELL)
+
+ for grimoire in $(codex_get_all_grimoires)
+ do
+ if SPELL_DIRECTORY=$(codex_cache_spell_lookup $SPELL $grimoire)
+ then
+ codex_set_current_spell $SPELL_DIRECTORY
+
+ # old states don't have the name stored so fall back to similar old
+ # broken behaviour where the first matching grimoire was used
+ [[ -z $installed_grimoire ]] && installed_grimoire=$GRIMOIRE_NAME
+
+ if [[ $GRIMOIRE_NAME == $installed_grimoire ]]
+ then
+ echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|${installed:="-"}"
+ else
+ echo "$GRIMOIRE_NAME|$SECTION|$SPELL|$VERSION|-"
+ fi
+ else
+ # handle also (re)moved spells
+ smgl_basename "$grimoire" name
+ if [[ $name == $installed_grimoire ]]; then
+ echo "$name|-|-|-|$installed"
+ else
+ echo "$name|-|-|-|-"
+ fi
+ fi
+ done
+ done
) | maybe_column -t -s "|"
-
echo
}
- [SM-Commit] GIT changes to master sorcery by Ismael Luceno (c8b59bf46989d31b00621a5c5e1d42177dc80c57), Ismael Luceno, 01/09/2015
Archive powered by MHonArc 2.6.24.