Refactor installing file to binary/pool/main/./.* functionality.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
This commit is contained in:
parent
f3f9239110
commit
13e554b150
|
@ -111,6 +111,33 @@ VMLINUZ_GI="gtk/vmlinuz"
|
||||||
INITRD_GI="gtk/initrd.gz"
|
INITRD_GI="gtk/initrd.gz"
|
||||||
DESTDIR_GI="${DESTDIR}/gtk"
|
DESTDIR_GI="${DESTDIR}/gtk"
|
||||||
|
|
||||||
|
Install_file() {
|
||||||
|
local FILE="${1}"
|
||||||
|
|
||||||
|
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}"
|
||||||
|
}
|
||||||
|
|
||||||
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
|
# Workaround for syslinux (<< 3.36) which doesn't support long file/path names
|
||||||
if [ "${LH_DISTRIBUTION}" = "etch" ]
|
if [ "${LH_DISTRIBUTION}" = "etch" ]
|
||||||
then
|
then
|
||||||
|
@ -231,28 +258,7 @@ if ls binary.deb/archives/*.deb > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
for FILE in binary.deb/archives/*.deb
|
for FILE in binary.deb/archives/*.deb
|
||||||
do
|
do
|
||||||
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
|
Install_file "${FILE}"
|
||||||
|
|
||||||
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
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -261,28 +267,7 @@ if [ -d cache/packages_bootstrap ]
|
||||||
then
|
then
|
||||||
for FILE in cache/packages_bootstrap/*.deb
|
for FILE in cache/packages_bootstrap/*.deb
|
||||||
do
|
do
|
||||||
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
|
Install_file "${FILE}"
|
||||||
|
|
||||||
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
|
done
|
||||||
else
|
else
|
||||||
Echo_error "E: Could not find cache/packages_bootstrap"
|
Echo_error "E: Could not find cache/packages_bootstrap"
|
||||||
|
@ -294,28 +279,7 @@ if ls ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb
|
for FILE in ../config/binary_local-debs/*_"${LH_ARCHITECTURE}".deb
|
||||||
do
|
do
|
||||||
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
|
Install_file "${FILE}"
|
||||||
|
|
||||||
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
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -323,28 +287,7 @@ if ls ../config/binary_local-debs/*_all.deb > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
for FILE in ../config/binary_local-debs/*_all.deb
|
for FILE in ../config/binary_local-debs/*_all.deb
|
||||||
do
|
do
|
||||||
SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
|
Install_file "${FILE}"
|
||||||
|
|
||||||
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
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue