sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
[SM-Discuss] [quill PATCH v2 1/4] quill: Allow specifying source URL on command line
- From: Ismael Luceno <ismael AT sourcemage.org>
- To: Jaka Kranjc <smgl AT lynxlynx.info>
- Cc: Ismael Luceno <ismael AT sourcemage.org>, sm-discuss AT lists.ibiblio.org
- Subject: [SM-Discuss] [quill PATCH v2 1/4] quill: Allow specifying source URL on command line
- Date: Thu, 25 Dec 2014 20:11:40 -0300
Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
---
usr/bin/quill | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/usr/bin/quill b/usr/bin/quill
index d65d615..bb622bd 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -97,8 +97,16 @@ elif [[ -n $2 ]]; then
message "Discarding leftover arguments!"
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"
+ ;;
+ esac
+ QUILL_TARGET=$(tr '[[:upper:]]' '[[:lower:]]' <<< "$QUILL_ORIG_TARGET")
fi
unset -f message
--
2.2.1
-
[SM-Discuss] [quill PATCH v2 1/4] quill: Allow specifying source URL on command line,
Ismael Luceno, 12/25/2014
- [SM-Discuss] [quill PATCH v2 2/4] quill: Allow specifying URL as second argument on CLI, Ismael Luceno, 12/25/2014
- [SM-Discuss] [quill PATCH v2 3/4] quill: Allow specifying version on command line when updating, Ismael Luceno, 12/25/2014
- [SM-Discuss] [quill PATCH v2 4/4] libcopy: Sort presented grimoire and section lists, Ismael Luceno, 12/25/2014
Archive powered by MHonArc 2.6.24.