[SM-Commit] GIT changes to master quill by Jaka Kranjc (86e18c3ac3da220545488b0c91626e5a0eef1544)

Jaka Kranjc scm at sourcemage.org
Mon Nov 5 07:01:57 EST 2007


GIT changes to master quill by Jaka Kranjc <lynxlynxlynx at sourcemage.org>:

 usr/bin/quill                    |   83 ---------------------------------
 var/lib/quill/ChangeLog          |    8 +++
 var/lib/quill/modules/libcompat  |   97 +++++++++++++++++++++++++++++++++++++++
 var/lib/quill/modules/libcore    |    2 
 var/lib/quill/modules/libhistory |    2 
 var/lib/quill/version            |    2 
 6 files changed, 109 insertions(+), 85 deletions(-)

New commits:
commit 86e18c3ac3da220545488b0c91626e5a0eef1544
Author: Jaka Kranjc <lynxlynxlynx at sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx at sourcemage.org>

    	* quill: fixed typo
    	* libcompat, quill: moved compatibility overrides to a separate file
    	* libhistory: don't mention HISTORY when adding it
    	* libcore: fixed quill_edit. It seems more than a hundred HISTORY files
    	  are not mime-typed as text/plain, but text/x-{c,c++,java,makefile,pascal}

diff --git a/usr/bin/quill b/usr/bin/quill
index 972d90d..6269b30 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -168,87 +168,6 @@ load_build_api
 mkdir -p $QUILL_TMP_DIR
 SPELL_UPDATED=n
 
-# devel sorcery function
-if ! declare -f codex_get_spell_paths &> /dev/null; then
-  function codex_get_spell_paths() {
-    local SPELL_DIRECTORY=$1
-    SECTION_DIRECTORY=${SPELL_DIRECTORY%/*}
-    SECTION=${SECTION_DIRECTORY##*/}
-    GRIMOIRE=${SECTION_DIRECTORY%/*}
-    GRIMOIRE_NAME=$(basename $GRIMOIRE)
-  }
-fi
-
-# workaround sorcery bug #13001
-unset -f url_ftp_verify &&
-function url_ftp_verify() {
-  local  URL=$1
-
-  if  [[  -n  "$URL"  ]];  then
-    local  FILENAME=`basename $URL`
-    local  DIRECTORY=`dirname $URL`
-    local  OUTPUT=`wget --passive-ftp -t 1 -T 30 -O - --spider -S "$DIRECTORY/" 2>&1`
-
-    if grep  -q  "$FILENAME" <<< "$OUTPUT";  then
-      rm  -f  .listing
-    else
-      echo  $OUTPUT  |  sed  's/LIST.*//g'
-      [[  -f  .listing  ]]  &&  cat  .listing
-      rm -f  .listing
-      false
-    fi
-  fi
-}
-
-# too many menu options for 1.13
-unset -f select_list &&
-function select_list()
-{
-    local i
-    local foo temp number
-    local returnvar=$1
-    local _default=$2
-    local stuff=()
-    local _default_num=0
-
-    shift 2
-    hash_unset select_list_hash
-    # see note in select_provider
-    stuff=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
-
-    let i=0
-    for foo in "$@"; do
-        message "\t$DEFAULT_COLOR(${stuff[$i]})  $SPELL_COLOR$foo$DEFAULT_COLOR"
-        hash_put select_list_hash "${stuff[$i]}" "$foo"
-        [[ "$foo" ]] && [[ "$foo" == "$_default" ]] && _default_num=${stuff[$i]}
-        let i++
-    done
-
-    local msgstr="\n${QUERY_COLOR}Which one do you want? [$_default_num]$DEFAULT_COLOR "
-    select_list_sub "$returnvar" select_list_hash "$msgstr" "$_default_num"
-    hash_unset select_list_hash
-}
-
-unset -f select_list_sub &&
-function select_list_sub() {
-  local returnvar=$1
-  local hashname=$2
-  local msgstr=$3
-  local _default=$4
-
-  local _result _answer
-
-  while [[ ! $_result ]] ; do
-    message -n "$msgstr"
-    read   -t  $PROMPT_DELAY  -n  1  _answer
-    [[ "$_answer" ]] || _answer=$_default
-    _result="$(hash_get $hashname $_answer)"
-  done
-  echo
-  eval $returnvar=\"$_result\"
-}
-
-
 #---
 ## Questions and stuff
 quill_welcome
@@ -571,7 +490,7 @@ else # no updates, we'll be making a spell
   fi
   message ""
   message "The spell has been generated and put into: $QUILL_SPELL_DIR/$SPELL_NAME"
-  if query "Do you want to put the spell into one of the avialable grimoires?" n
+  if query "Do you want to put the spell into one of the available grimoires?" n
   then
     quill_final_put_in_grimoire &&
     if query "Do you want to *try* to cast the spell?" n
diff --git a/var/lib/quill/ChangeLog b/var/lib/quill/ChangeLog
index d9d45dc..ccf361e 100644
--- a/var/lib/quill/ChangeLog
+++ b/var/lib/quill/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-05 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
+	* quill: fixed typo
+	* libcompat, quill: moved compatibility overrides to a separate file
+	* libhistory: don't mention HISTORY when adding it
+	* libcore: fixed quill_edit. It seems more than a hundred HISTORY files
+	  are not mime-typed as text/plain, but text/x-{c,c++,java,makefile,pascal}
+	* version: 0.2.9-rc6
+
 2007-11-04 Jaka Kranjc <lynxlynxlynx at sourcemage.org>
 	* libcore: fixed QUILL_SUDO default for when reconfiguring
 	* version: 0.2.9-rc5
diff --git a/var/lib/quill/modules/libcompat b/var/lib/quill/modules/libcompat
new file mode 100644
index 0000000..acf996e
--- /dev/null
+++ b/var/lib/quill/modules/libcompat
@@ -0,0 +1,97 @@
+# 1.14 sorcery function
+if ! declare -f codex_get_spell_paths &> /dev/null; then
+  function codex_get_spell_paths() {
+    local SPELL_DIRECTORY=$1
+    SECTION_DIRECTORY=${SPELL_DIRECTORY%/*}
+    SECTION=${SECTION_DIRECTORY##*/}
+    GRIMOIRE=${SECTION_DIRECTORY%/*}
+    GRIMOIRE_NAME=$(basename $GRIMOIRE)
+  }
+fi
+
+# 1.13 workaround sorcery bug #13001
+unset -f url_ftp_verify &&
+function url_ftp_verify() {
+  local  URL=$1
+
+  if  [[  -n  "$URL"  ]];  then
+    local  FILENAME=`basename $URL`
+    local  DIRECTORY=`dirname $URL`
+    local  OUTPUT=`wget --passive-ftp -t 1 -T 30 -O - --spider -S "$DIRECTORY/" 2>&1`
+
+    if grep  -q  "$FILENAME" <<< "$OUTPUT";  then
+      rm  -f  .listing
+    else
+      echo  $OUTPUT  |  sed  's/LIST.*//g'
+      [[  -f  .listing  ]]  &&  cat  .listing
+      rm -f  .listing
+      false
+    fi
+  fi
+}
+
+# too many menu options for 1.13
+unset -f select_list &&
+function select_list()
+{
+    local i
+    local foo temp number
+    local returnvar=$1
+    local _default=$2
+    local stuff=()
+    local _default_num=0
+
+    shift 2
+    hash_unset select_list_hash
+    # see note in select_provider
+    stuff=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
+
+    let i=0
+    for foo in "$@"; do
+        message "\t$DEFAULT_COLOR(${stuff[$i]})  $SPELL_COLOR$foo$DEFAULT_COLOR"
+        hash_put select_list_hash "${stuff[$i]}" "$foo"
+        [[ "$foo" ]] && [[ "$foo" == "$_default" ]] && _default_num=${stuff[$i]}
+        let i++
+    done
+
+    local msgstr="\n${QUERY_COLOR}Which one do you want? [$_default_num]$DEFAULT_COLOR "
+    select_list_sub "$returnvar" select_list_hash "$msgstr" "$_default_num"
+    hash_unset select_list_hash
+}
+
+unset -f select_list_sub &&
+function select_list_sub() {
+  local returnvar=$1
+  local hashname=$2
+  local msgstr=$3
+  local _default=$4
+
+  local _result _answer
+
+  while [[ ! $_result ]] ; do
+    message -n "$msgstr"
+    read   -t  $PROMPT_DELAY  -n  1  _answer
+    [[ "$_answer" ]] || _answer=$_default
+    _result="$(hash_get $hashname $_answer)"
+  done
+  echo
+  eval $returnvar=\"$_result\"
+}
+
+#---
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+##
+#---
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore
index 2c6205c..846ecfe 100644
--- a/var/lib/quill/modules/libcore
+++ b/var/lib/quill/modules/libcore
@@ -162,7 +162,7 @@ function quill_edit() {
   for spell_file in ${1:-*}
   do
     type=$(file -bi $spell_file)
-    if list_find "$type" "text/plain;"
+    if grep -q "text/" <<< "$type"
     then
       $EDITOR $spell_file
     fi
diff --git a/var/lib/quill/modules/libhistory b/var/lib/quill/modules/libhistory
index 6147992..4afde54 100644
--- a/var/lib/quill/modules/libhistory
+++ b/var/lib/quill/modules/libhistory
@@ -13,7 +13,7 @@ function add_history()
 
   files=$(echo * | sed -e 's, \S*\.sign* , ,g; s, \S*\.asc , ,g' -e 's/ /, /g')
   echo > HISTORY
-  sed -i "1 s%^.*$%$title\n\t* ${files/HISTORY/}, HISTORY: $1\n%" HISTORY
+  sed -i "1 s%^.*$%$title\n\t* ${files/HISTORY/}: $1\n%" HISTORY
 
   message "Done."
 
diff --git a/var/lib/quill/version b/var/lib/quill/version
index 09ee67c..298dbab 100644
--- a/var/lib/quill/version
+++ b/var/lib/quill/version
@@ -1 +1 @@
-0.2.9-rc5
+0.2.9-rc6



More information about the SM-Commit mailing list