summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmael Luceno2021-05-24 14:54:01 +0200
committerIsmael Luceno2021-05-24 14:54:14 +0200
commitba2b03846715778dc4305b77af5aa439e43dac11 (patch)
tree162e4bb79e0859c5ea29537e7c0d047fe34140fb
parent716b074a93ef600ce0a91fbf4d7ee1a0639d858b (diff)
quill: Simplify parsing of Github URLs
Extract the name using a fixed index; counting from the end can vary the relative index in case of full refs. Fixes: 4668bcd70ba8 ("quill: Fix parsing of Github URLs")
-rwxr-xr-xusr/bin/quill2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/bin/quill b/usr/bin/quill
index 79167cf..7380ba3 100755
--- a/usr/bin/quill
+++ b/usr/bin/quill
@@ -105,7 +105,7 @@ if [[ -z $QUILL_TARGET ]]; then
;;
https://github.com/*/archive/*)
SPELL_SRC_URL="$1"
- QUILL_ORIG_TARGET=$(awk -F/ '{print $(NF-2)}' <<< "$1")
+ QUILL_ORIG_TARGET=$(awk -F/ '{print $5}' <<< "$1")
;;
*:*)
SPELL_SRC_URL="$1"