summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-01-15 02:41:10 +0000
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:35:34 +0100
commit716d31d5877dc5d7f4f0182d7a9aaabca825231e (patch)
treec2235cf8bf1bd999945ea33317f7a93ec706f53b /helpers
parent82556b2855b3ea99603faa8cdf209f6618eec832 (diff)
downloadlive-build-716d31d5877dc5d7f4f0182d7a9aaabca825231e.zip
live-build-716d31d5877dc5d7f4f0182d7a9aaabca825231e.tar.gz
Don't put more than one glob on a 'for' line, unless they are guaranteed
to succeed, otherwise the second one is not expanded and "*.deb" (for example) is used literally. This patch expands (haha) each "for" loop into it's own.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_debian-installer64
1 files changed, 61 insertions, 3 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 056d89d..0bf778c 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -227,10 +227,39 @@ if [ "${LH_DEBIAN_INSTALLER}" != "netboot" ]; then
mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
fi
+if ls binary.deb/archives/*.deb > /dev/null 2>&1
+then
+ for FILE in binary.deb/archives/*.deb
+ do
+ SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
+
+ if [ -z "${SOURCE}" ]
+ then
+ SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
+ fi
+
+ case "${SOURCE}" in
+ lib?*)
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
+ ;;
+
+ *)
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
+ ;;
+ esac
+
+ # Install directory
+ mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
+
+ # Move files
+ cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
+ done
+fi
+
# Including base debian packages
if [ -d cache/packages_bootstrap ]
then
- for FILE in cache/packages_bootstrap/*.deb binary.deb/archives/*.deb
+ for FILE in cache/packages_bootstrap/*.deb
do
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
@@ -261,9 +290,38 @@ else
fi
# Including local debs
-if ls ../config/binary_local-debs/*.deb > /dev/null 2>&1
+if ls ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb > /dev/null 2>&1
+then
+ for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb
+ do
+ SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
+
+ if [ -z "${SOURCE}" ]
+ then
+ SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
+ fi
+
+ case "${SOURCE}" in
+ lib?*)
+ LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')"
+ ;;
+
+ *)
+ LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')"
+ ;;
+ esac
+
+ # Install directory
+ mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
+
+ # Move files
+ cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
+ done
+fi
+
+if ls ../config/binary_local-debs/*_all.deb > /dev/null 2>&1
then
- for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb ../config/binary_local-debs/*_all.deb
+ for FILE in ../config/binary_local-debs/*_all.deb
do
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"