mklive/scripts/installer.sh

33 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
source $(dirname $0)/defaults.conf
source ${WORKDIR}/mklive.conf
source $(dirname $0)/functions.sh
echo "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 ] || wget ${!URLVAR} -O ${WORKDIR}/INSTALLER/${dist}_netboot.tar.gz
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
endstage installer