diff options
author | Ismael Luceno | 2016-11-23 13:20:06 -0200 |
---|---|---|
committer | Ismael Luceno | 2016-11-23 13:20:06 -0200 |
commit | 332d95acc28bd7f48a6e65cec29b64beea8633ee (patch) | |
tree | be71c0e2daeccc0e3d5b86f3dfa0037312c6c4f0 | |
parent | 423760b8e0d503f5d5e49fb8a411e7e6cb14e364 (diff) |
libcore, libdetails: Fix naming of Github tarballs
-rw-r--r-- | var/lib/quill/modules/libcore | 2 | ||||
-rw-r--r-- | var/lib/quill/modules/libdetails | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/var/lib/quill/modules/libcore b/var/lib/quill/modules/libcore index 990942f..9b62606 100644 --- a/var/lib/quill/modules/libcore +++ b/var/lib/quill/modules/libcore @@ -70,7 +70,7 @@ function get_spell_source(){ cp $SOURCE_CACHE/$SPELL_SRC_FILE . message "Done." else - wget --no-check-certificate -c "${SPELL_SRC_URL}" + wget --no-check-certificate -c "${SPELL_SRC_URL}" -O "$SPELL_SRC_FILE" fi echo cd ${QUILL_SPELL_DIR}/${SPELL_NAME} diff --git a/var/lib/quill/modules/libdetails b/var/lib/quill/modules/libdetails index 517c948..08be920 100644 --- a/var/lib/quill/modules/libdetails +++ b/var/lib/quill/modules/libdetails @@ -128,13 +128,15 @@ fi #--- function parse_spell_source_file_info(){ SPELL_SRC_FILE="${SPELL_SRC_URL##*/}" - if expr "$SPELL_SRC_FILE" : 'v[0-9]\.' >/dev/null; then - SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : 'v\(.*\)\.[rtz]') - elif expr "$SPELL_SRC_FILE" : '[0-9]\.' >/dev/null; then - SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : '\(.*\)\.[rtz]') - else - SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : ".*[-_]\([0-9].*\)\.[rtz]") - fi + case "$SPELL_SRC_FILE" in + v[0-9]*|[0-9]*) + SPELL_VERSION=$(expr "${SPELL_SRC_FILE#v}" : '\(.*\)\.[rtz]') + SPELL_SRC_FILE="$SPELL_NAME-${SPELL_SRC_FILE#v}" + ;; + *) + SPELL_VERSION=$(expr "$SPELL_SRC_FILE" : ".*[-_]\([0-9].*\)\.[rtz]") + ;; + esac [[ -n $SPELL_SRC_FILE ]] } |