From b6dbbdfeb5375af587ebd0d41e9269cbe9418a12 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 21 Aug 2014 14:36:35 -0400 Subject: install: Add support for "src/gz" feeds --- (limited to 'lib/cmd') 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}" \ -- cgit v0.9.1