Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] [PATCH v2] Allow specifying source url on command line

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Cc: Ismael Luceno <ismael AT sourcemage.org>
  • Subject: [SM-Discuss] [PATCH v2] Allow specifying source url on command line
  • Date: Mon, 20 May 2013 21:54:12 +0000


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
--
1.8.2.3





Archive powered by MHonArc 2.6.24.

Top of Page