Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f1c86ee46c354f47a463e71774b447dc31cd41b8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • 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 (f1c86ee46c354f47a463e71774b447dc31cd41b8)
  • Date: Fri, 23 Nov 2007 08:01:14 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 4 ++++
usr/sbin/sorcery | 33 +++++++++++++++------------------
2 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit f1c86ee46c354f47a463e71774b447dc31cd41b8
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

sorcery: rewrote show_installed_spell and fixed remove_pkgs - removing
spells from the sorcery menu works again

diff --git a/ChangeLog b/ChangeLog
index 5e73bc2..2972c29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-23 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * sorcery: rewrote show_installed_spell and fixed remove_pkgs -
removing
+ spells from the sorcery menu works again
+
2007-11-21 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libsummon: fail on any text/ mimetype when checking the tarball
source
sanity
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index a5c3a34..8d5bd4f 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -311,25 +311,22 @@ file_menu() {


show_installed_spells() {
+ local spell date status version

- for LINE in `sort $SPELL_STATUS`; do
+ while read spell date status version; do
+ if [[ $status == "installed" ]] ||
+ [[ $status == "held" ]]; then

- SPELL=`echo "$LINE" | cut -d : -f1`
- STATUS=`echo "$LINE" | cut -d : -f3`
- VERSION=`echo "$LINE" | cut -d : -f4`
-
- if [ "$STATUS" == "installed" ] ||
- [ "$STATUS" == "held" ]; then
-
- if codex_set_current_spell_by_name $SPELL; then
- echo -en '"'${SPELL:="Unknown"}'"'
- echo -en '\t"'${VERSION:="-"}'"'
- echo -e '\t"'${SHORT:="Description Unavailable"}'"'
+ if codex_set_current_spell_by_name $spell; then
+ SHORT=${SHORT:-"Description unavailable"}
+ echo -en '"'${spell:="Unknown"}'"'
+ echo -en '\t"'${version:="-"}'"'
+ echo -e '\t"'${SHORT//\"/\'}'"'
fi

fi
- done
-
+ done < <(tr : " " < $SPELL_STATUS) | sort
+ codex_clear_current_spell
}


@@ -356,13 +353,13 @@ remove_pkgs() {
codex_set_current_spell_by_name $SPELL
DESCRIPTION=`codex_get_spell_description $SPELL_DIRECTORY`

- if $DIALOG --title "Remove $SPELL?" \
+ if eval $DIALOG '--title "Remove $SPELL?" \
--yesno "$DESCRIPTION" \
- 0 0
+ 0 0'
then
push_remove_queue $SPELL &&
- $DIALOG --msgbox "$SPELL added to the remove queue." 0 0 ||
- $DIALOG --msgbox "$SPELL is not really installed?" 0 0
+ eval $DIALOG '--msgbox "$SPELL added to the remove queue." 0 0' ||
+ eval $DIALOG '--msgbox "$SPELL is not really installed?" 0 0'
fi

done



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (f1c86ee46c354f47a463e71774b447dc31cd41b8), Jaka Kranjc, 11/23/2007

Archive powered by MHonArc 2.6.24.

Top of Page