From 0e8fdef802e0d420cff2528dbdf423d559d3b65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Thu, 17 Nov 2016 19:39:22 +0100 Subject: subr/check_updates.subr: preliminary support for libgpg_error and util_linux. --- subr/check_updates.subr | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'subr') diff --git a/subr/check_updates.subr b/subr/check_updates.subr index 62f3c53c..26a2c4a4 100644 --- a/subr/check_updates.subr +++ b/subr/check_updates.subr @@ -8,7 +8,7 @@ cpu_get_fnames() { *://github.com/*) _cpugf_uname="${cu_url#*/github.com/}"; _cpugf_uname="${_cpugf_uname%%/*}"; - _cpugf_pname="${cu_url#*/github.com/${_cpu_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; @@ -17,6 +17,18 @@ cpu_get_fnames() { cu_fname_base="${cu_name}"; cu_fname_ext="${cu_fname#v${cu_version}.}"; ;; + */libgpg-error/*) + cu_url_index="${cu_url%/*}/"; + cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\ + sed -n '/href="[^"]\+"/s/^.*href="\([^"]\+\)".*$/\1/p')"; + cu_fname_base="libgpg-error"; + ;; + */util-linux/*) + cu_fname_base="util_linux"; + cu_url_index="https://www.kernel.org/pub/linux/utils/util-linux/"; + cu_fnames="$(wget ${WGET_ARGS} -qO- ${cu_url_index} |\ + sed -n '/href="[^"]\+"/{s/^.*href="\([^"]\+\)".*$/\1/;s/\/$//;p}')"; + ;; *) cu_url_index="${cu_url%/*}/"; cu_fnames="$(wget ${WGET_ARGS} -qO- "${cu_url_index}" |\ @@ -32,6 +44,8 @@ cpu_get_version() { case "${cu_url}" in *://github.com/*) cu_fname_version="${cu_fname}"; ;; + */util-linux/*) + cu_fname_version="${cu_fname#v}"; ;; *) if ! [ "${cu_fname#${cu_fname_base}-}" = "${cu_fname}" ]\ && ! [ "${cu_fname%.${cu_fname_ext}}" = "${cu_fname}" ]; then cu_fname_version="${cu_fname#${cu_fname_base}-}"; -- cgit v1.2.3