summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 15:03:37 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 15:31:58 (EST)
commit86080f13a07435ff860cd239ed614434b1f42b56 (patch)
tree7082963fad9b94e3b69b987df2dd32a3f4fe4dba /src
parent0b1f5e605cc58c754be76a4e86070c27389a60d7 (diff)
install_get_pkgs(): New "url" variable
Diffstat (limited to 'src')
-rw-r--r--src/install.sh10
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}" | \