38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
source $(dirname $0)/defaults.conf
|
|
source ${WORKDIR}/mklive.conf
|
|
source $(dirname $0)/functions.sh
|
|
|
|
set -e
|
|
|
|
einfo "Preparing Installer"
|
|
|
|
startstage installer
|
|
|
|
requiredir ${WORKDIR}/INSTALLER
|
|
|
|
installerdists=""
|
|
|
|
if [ "$ISO_INCLUDE_UBUNTU_INSTALLER" == "true" ] || [ "$PXE_INCLUDE_UBUNTU_INSTALLER" == "true" ]; then
|
|
installerdists="${installerdists} ubuntu"
|
|
fi
|
|
|
|
if [ "$ISO_INCLUDE_DEBIAN_INSTALLER" == "true" ] || [ "$PXE_INCLUDE_DEBIAN_INSTALLER" == "true" ]; then
|
|
installerdists="${installerdists} debian"
|
|
fi
|
|
|
|
|
|
for dist in $installerdists
|
|
do
|
|
URLVAR="${dist^^}_INSTALL_NETBOOT"
|
|
[ -z "${!URLVAR}" ] && continue;
|
|
[ -e ${WORKDIR}/INSTALLER/${dist}_netboot.tar.gz ] || ( einfo "Missing ${dist} netboot installer. Downloading ..." && wget ${!URLVAR} -O ${WORKDIR}/INSTALLER/${dist}_netboot.tar.gz )
|
|
[ $? -eq 0 ] || ( eerr "Download failed." && break )
|
|
tar -C ${WORKDIR}/INSTALLER -xzf ${WORKDIR}/INSTALLER/${dist}_netboot.tar.gz ./$dist-installer/amd64/linux ./${dist}-installer/amd64/initrd.gz
|
|
tar -C ${WORKDIR}/INSTALLER --transform "s/txt/${dist}/" --strip 4 -xzf ${WORKDIR}/INSTALLER/${dist}_netboot.tar.gz ./${dist}-installer/amd64/boot-screens/txt.cfg
|
|
done
|
|
|
|
eok "Installer done."
|
|
|
|
endstage installer
|