summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-18 15:36:39 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-18 15:36:39 +0100
commit0bb2fe5ce7d0ea9bffc550bf60062673024948c7 (patch)
tree87efddbdea4a53fe3f51c618b4b54f8ba0c3cc3f /subr
parent4489045a68486a2641a09195ba98b023094a20fc (diff)
downloadmidipix_build-0bb2fe5ce7d0ea9bffc550bf60062673024948c7.tar.bz2
midipix_build-0bb2fe5ce7d0ea9bffc550bf60062673024948c7.tar.xz
subr/check_updates.subr: preliminary support for apk_tools and bzip2.
Diffstat (limited to 'subr')
-rw-r--r--subr/check_updates.subr32
1 files changed, 17 insertions, 15 deletions
diff --git a/subr/check_updates.subr b/subr/check_updates.subr
index fc331211..7af20e96 100644
--- a/subr/check_updates.subr
+++ b/subr/check_updates.subr
@@ -6,22 +6,24 @@
cpu_get_fnames() {
if test_cmd pkg_${cu_name}_check_updates; then
pkg_${cu_name}_check_updates get_fnames;
- elif [ "${cu_url#*://github.com/*}" != "${cu_url}" ]; then
- _cpugf_uname="${cu_url#*/github.com/}";
- _cpugf_uname="${_cpugf_uname%%/*}";
- _cpugf_pname="${cu_url#*/github.com/${_cpugf_uname}/}";
- _cpugf_pname="${_cpugf_pname%%/*}";
- cu_url_index="https://github.com/${_cpugf_uname%%/*}/${_cpugf_pname%%/*}/releases/";
- unset _cpu_uname _cpu_pname;
- cu_fnames="$(wget ${WGET_ARGS} -qO- ${cu_url_index} |\
- sed -n '/<span class="tag-name">/s/^.*<span class="tag-name">\([a-zA-Z]\+-\|v\|\)\(.\+\)<\/span>.*$/\2/p')";
- cu_fname_base="${cu_name}";
- cu_fname_ext="${cu_fname#v${cu_version}.}";
fi;
- if [ -z "${cu_url_index}" ]; then
- cu_url_index="${cu_url%/*}/";
- cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\
- sed -n '/[hH][rR][eE][fF]="[^"]\+"/s/^.*[hH][rR][eE][fF]="\([^"]\+\)".*$/\1/p')";
+ if [ -z "${cu_fnames}" ]; then
+ if [ "${cu_url#*://github.com/*}" != "${cu_url}" ]; then
+ _cpugf_uname="${cu_url#*/github.com/}";
+ _cpugf_uname="${_cpugf_uname%%/*}";
+ _cpugf_pname="${cu_url#*/github.com/${_cpugf_uname}/}";
+ _cpugf_pname="${_cpugf_pname%%/*}";
+ cu_url_index="https://github.com/${_cpugf_uname%%/*}/${_cpugf_pname%%/*}/releases/";
+ unset _cpu_uname _cpu_pname;
+ cu_fnames="$(wget ${WGET_ARGS} -qO- ${cu_url_index} |\
+ sed -n '/<span class="tag-name">/s/^.*<span class="tag-name">\([a-zA-Z]\+-\|v\|\)\(.\+\)<\/span>.*$/\2/p')";
+ cu_fname_base="${cu_name}";
+ cu_fname_ext="${cu_fname#v${cu_version}.}";
+ else
+ cu_url_index="${cu_url%/*}/";
+ cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\
+ sed -n '/[hH][rR][eE][fF]="[^"]\+"/s/^.*[hH][rR][eE][fF]="\([^"]\+\)".*$/\1/p')";
+ fi;
fi;
: ${cu_fname:="${cu_url##*/}"};
: ${cu_fname_base:="${cu_fname%%-*}"};