summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_debian-installer
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-01-15 19:42:28 +0000
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:35:41 +0100
commitcf3d97cd1ff52a8974812fa7b8102c431fafe9d1 (patch)
treecadf4d1ffa71a45d335102b8a8a844efd61f1f82 /helpers/lh_binary_debian-installer
parent342d2870ebe66fc987bbb6523c67885631eb0e00 (diff)
downloadvyos-live-build-cf3d97cd1ff52a8974812fa7b8102c431fafe9d1.tar.gz
vyos-live-build-cf3d97cd1ff52a8974812fa7b8102c431fafe9d1.zip
Use Install_file for udebs.
Diffstat (limited to 'helpers/lh_binary_debian-installer')
-rwxr-xr-xhelpers/lh_binary_debian-installer38
1 files changed, 9 insertions, 29 deletions
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 050f48ff3..9522bab1b 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -113,6 +113,7 @@ DESTDIR_GI="${DESTDIR}/gtk"
Install_file() {
local FILE="${1}"
+ local TARGET="${2}"
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
@@ -132,10 +133,10 @@ Install_file() {
esac
# Install directory
- mkdir -p binary/pool/main/"${LETTER}"/"${SOURCE}"
+ mkdir -p "${TARGET}"/"${LETTER}"/"${SOURCE}"
# Move files
- cp "${FILE}" binary/pool/main/"${LETTER}"/"${SOURCE}"
+ cp "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}"
}
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
@@ -255,7 +256,7 @@ if [ "${LH_DEBIAN_INSTALLER}" != "netboot" ]; then
for FILE in binary.deb/archives/*.deb
do
- Install_file "${FILE}"
+ Install_file "${FILE}" "binary/pool/main"
done
fi
@@ -264,7 +265,7 @@ if [ -d cache/packages_bootstrap ]
then
for FILE in cache/packages_bootstrap/*.deb
do
- Install_file "${FILE}"
+ Install_file "${FILE}" "binary/pool/main"
done
else
Echo_error "E: Could not find cache/packages_bootstrap"
@@ -274,12 +275,12 @@ fi
# Including local debs
for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb
do
- Install_file "${FILE}"
+ Install_file "${FILE}" "binary/pool/main"
done
for FILE in ../config/binary_local-debs/*_all.deb
do
- Install_file "${FILE}"
+ Install_file "${FILE}" "binary/pool/main"
done
# Generating deb indices
@@ -326,30 +327,9 @@ if ls ../config/binary_local-udebs/*.udeb > /dev/null 2>&1
then
for FILE in ../config/binary_local-udebs/*_"${LH_ARCHITECTURE}".udeb ../config/binary_local-udebs/*_all.udeb
do
- SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
+ Install_file "${FILE}" "pool/main"
- 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 pool/main/"${LETTER}"/"${SOURCE}"
-
- # Copy files
- cp "${FILE}" pool/main/"${LETTER}"/"${SOURCE}"
-
- # Prefere local udebs over downloaded udebs
+ # Prefer local udebs over downloaded udebs
rm -f "$(basename ${FILE} | awk -F_ '{ print $1 }')"_*.udeb
done
fi