From 86080f13a07435ff860cd239ed614434b1f42b56 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 17 Jan 2016 15:03:37 -0500 Subject: install_get_pkgs(): New "url" variable --- diff --git a/src/install.sh b/src/install.sh index 978b8dd..da786bd 100644 --- a/src/install.sh +++ b/src/install.sh @@ -196,9 +196,10 @@ install_get_pkgs() local root="${1}" local status_fd= local pkg= - local fname= + local url= local md5sum= local sha256sum= + local fname= local file= local control= local field= @@ -214,16 +215,15 @@ install_get_pkgs() for pkg in $(cat "${root}/.prokit/packages"); do info "$(get_msg 'install_downloading_pkg')" "${pkg}" - fname="$(printf '%s\n' "${install_urls}" | \ + url="$(printf '%s\n' "${install_urls}" | \ sed -n "s/^${pkg} //p")" md5sum="$(printf '%s\n' "${install_md5sums}" | \ sed -n "s/^${pkg} //p")" sha256sum="$(printf '%s\n' "${install_sha256sums}" | \ sed -n "s/^${pkg} //p")" - ${WGET} -q -O "${root}/var/cache/opkg/archives/${fname##*/}" \ - "${fname}" || \ + fname="var/cache/opkg/archives/${url##*/}" + ${WGET} -q -O "${root}/${fname}" "${url}" || \ error 2 "$(get_msg 'install_downloading_pkg_fail')" - fname="var/cache/opkg/archives/${fname##*/}" if [ "x${md5sum}" != 'x' ]; then printf '%s %s\n' \ "${md5sum}" "${root}/${fname}" | \ -- cgit v0.9.1