sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master quill by Ismael Luceno (c83434facffcde3b3b442dad6dee855aaa226874)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master quill by Ismael Luceno (c83434facffcde3b3b442dad6dee855aaa226874)
- Date: Sat, 3 Jan 2015 21:06:51 -0600
GIT changes to master quill by Ismael Luceno <ismael AT sourcemage.org>:
usr/bin/quill | 26 ++++++++++++++++++--------
var/lib/quill/modules/libcopy | 9 +++++----
2 files changed, 23 insertions(+), 12 deletions(-)
New commits:
commit c83434facffcde3b3b442dad6dee855aaa226874
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
libcopy: Sort presented grimoire and section lists
commit 9b7fb0096e70a28460903e17bb2f78ac92d03eaa
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
quill: Remove the useless argument discarding warning
commit eb0f65b58eded40bc71b18d9980ae82391ff1654
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
quill: Allow specifying version on command line when updating
commit 4f2f4f21604af4042d9c1acdaac82a0e9b6dce83
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
quill: Allow specifying URL as second argument on CLI
commit 6228cc2dfa3641643540dc0400420c8bbeb33b2b
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
quill: Allow specifying source URL on command line
diff --git a/usr/bin/quill b/usr/bin/quill
index d65d615..be95b3d 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -89,16 +89,26 @@ while true; do
esac
shift
done
-if [[ -z $1 && -n $QUILL_UPDATE ]]; then
- error_msg "Missing spellname argument!"
- sleep 1
- quill_help 104
-elif [[ -n $2 ]]; then
- message "Discarding leftover arguments!"
+if [[ -n $QUILL_UPDATE ]]; then
+ if [[ -z $1 ]]; then
+ error_msg "Missing spellname argument!"
+ sleep 1
+ quill_help 104
+ fi
+ SPELL_VERSION="$2"
fi
if [[ -z $QUILL_TARGET ]]; then
- QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$1")
- QUILL_ORIG_TARGET=$1
+ case "$1" in
+ *:*)
+ SPELL_SRC_URL="$1"
+ QUILL_ORIG_TARGET=$(basename "$1" | sed 's@[-._][0-9][^-_]*$@@')
+ ;;
+ *)
+ QUILL_ORIG_TARGET="$1"
+ SPELL_SRC_URL="$2"
+ ;;
+ esac
+ QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$QUILL_ORIG_TARGET")
fi
unset -f message
diff --git a/var/lib/quill/modules/libcopy b/var/lib/quill/modules/libcopy
index a514f70..eafc399 100644
--- a/var/lib/quill/modules/libcopy
+++ b/var/lib/quill/modules/libcopy
@@ -20,13 +20,14 @@ function copy_new_to_git()
find "$QUILL_GIT_DIR" -maxdepth 1 -type d |
while read dir; do
[[ -d $dir/.git ]] && basename $dir
- done | column
+ done | sort | column
query_string grimoire "Which of the above is the target git grimoire? "
while ! dir_check "$QUILL_GIT_DIR/$grimoire"; do
query_string grimoire "Which of the above is the target git grimoire? "
done
echo
- find "$QUILL_GIT_DIR/$grimoire" -maxdepth 1 -type d -printf "%P\n" |
column
+ find "$QUILL_GIT_DIR/$grimoire" -maxdepth 1 -type d -printf "%P\n" |
+ sort | column
query_string section "Which section do you want to put it in? "
while ! dir_check "$QUILL_GIT_DIR/$grimoire/$section"; do
query_string section "Which section do you want to put it in? "
@@ -175,13 +176,13 @@ function quill_final_put_in_grimoire() {
if [[ -z $2 ]]; then
query_list "Into which grimoire do you wish to put the spell:"
quill_grim_name \
- "" $(codex_get_all_grimoires | get_basenames)
+ "" $(codex_get_all_grimoires | get_basenames | sort)
echo
quill_grim_name=$(codex_canonicalize_grimoire_name $quill_grim_name
lookup)
# can't use query_list, as the section count can be bigger than the
available index
message "Available sections in grimoire $quill_grim_name:"
- codex_get_section_names $quill_grim_name | column
+ codex_get_section_names $quill_grim_name | sort | column
query_string quill_sect_name "Into which section do you wish to put the
spell: "
if [[ -e $quill_grim_name/$quill_sect_name/$SPELL_NAME ]]; then
- [SM-Commit] GIT changes to master quill by Ismael Luceno (c83434facffcde3b3b442dad6dee855aaa226874), Ismael Luceno, 01/03/2015
Archive powered by MHonArc 2.6.24.