diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/install.sh | 10 |
1 files changed, 5 insertions, 5 deletions
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}" | \ |