summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-08-21 14:36:35 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-08-21 14:36:35 (EDT)
commitb6dbbdfeb5375af587ebd0d41e9269cbe9418a12 (patch)
treea862068a4d6459993ffd36619d0c316432894d7b
parentf3f8f380cea04a9db333f22ed801ad4d5d83106f (diff)
install: Add support for "src/gz" feeds
-rw-r--r--lib/cmd/install.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh
index 1f1aeb7..2605831 100644
--- a/lib/cmd/install.sh
+++ b/lib/cmd/install.sh
@@ -118,8 +118,10 @@ cmd_install_find_pkgs()
local chroot="${5}"
local opkg_conf_fd=
local pkgs_fd=
+ local opt=
local feed_idx=
local feed=
+ local gzip=
local pkgs=
mkdir -p "${chroot}/etc/opkg" "${chroot}/var/lib/opkg/lists"
@@ -132,9 +134,15 @@ cmd_install_find_pkgs()
fopen "${chroot}/.prokit/packages" 'w'
pkgs_fd=${FD}
- while read -r feed_idx feed; do
- printf 'src %s %s\n' "${feed_idx}" "${feed}" >&${opkg_conf_fd}
- feed_download "${feed}" \
+ while read -r opt feed_idx feed; do
+ case "${opt}" in
+ 'src') gzip=false;;
+ 'src/gz') gzip=true;;
+ *) continue;;
+ esac
+ printf '%s %s %s\n' "${opt}" "${feed_idx}" "${feed}" \
+ >&${opkg_conf_fd}
+ feed_download "${feed}" ${gzip} \
>"${chroot}/var/lib/opkg/lists/${feed_idx}"
cmd_install_feed_url="${feed%/*}"
feed_find_pkgs "${chroot}/var/lib/opkg/lists/${feed_idx}" \