This commit is contained in:
teldra 2022-02-09 10:55:37 +01:00
parent f2dd89dea5
commit 906d486c74
2 changed files with 29 additions and 6 deletions

View File

@ -5,17 +5,18 @@ err() {
}
header() {
if [ "$DEBUG" == "1" ]; then
if [ "$DEBUG" -ge "1" ]; then
echo please enter enter
read a
if [ "$a" == "2" ]; then
if [ "$a" -ge "2" ]; then
set -x
elif [ "$a" == "0" ]; then
fi
if [ "$a" == "0" ]; then
DEBUG=0
fi
fi
clear
echo "#### $1"
echo "#### $1 ####"
}
addpkg() {

26
main.sh
View File

@ -252,13 +252,35 @@ do_install() {
for i in "${ignorepkgs[@]}"; do
echo "ignorepkg=${i}" >> "${target}/etc/xbps.d/10-ignore-pkg.conf"
done
if [ "${DEBUG}" == "1" ]; then
if [ "${DEBUG}" -ge "1" ]; then
echo_vars
read
xbps-install -S -R https://alpha.de.repo.voidlinux.org/current -r "${target}" "${pkgs[@]}"
else
xbps-install -Sy -R https://alpha.de.repo.voidlinux.org/current -r "${target}" "${pkgs[@]}"
fi
}
echo_vars() {
echo "USERNAME=${USERNAME}" > "${vars}"
echo "PASS=${PASS}" >> "${vars}"
echo "HOSTNAME=${HOSTNAME}" >> "${vars}"
if [ "${DEBUG}" -ge "1" ]; then
echo "EFI=${EFI}" >> "${vars}"
echo "LANGUAGE_=${LANGUAGE_}" >> "${vars}"
echo "L1=${L1}" >> "${vars}"
echo "L2=${L2}" >> "${vars}"
echo "TARGET_PHY_ID=${TARGET_PHY_ID}" >> "${vars}"
echo "TARGET_PART=${TARGET_PART}" >> "${vars}"
echo "TARGETNAME_UNDERSCORE=${TARGETNAME_UNDERSCORE}" >> "${vars}"
echo "ENCRYPTION_STYLE=${ENCRYPTION_STYLE}" >> "${vars}"
echo "TIMEZONE=${TIMEZONE}" >> "${vars}"
echo "ENC=${ENC}" >> "${vars}"
echo "HIBERNATE=${HIBERNATE}" >> "${vars}"
echo "KEY_LANG=${KEY_LANG}" >> "${vars}"
fi
}
do_chroot() {
header "Chroot into new System"
mkdir -p "${target}/tmp/vinstaller/"
@ -333,7 +355,7 @@ ready() {
echo "${ignorepkgs[@]}"
echo ""
echo "vars:"
cat ${vars}
echo_vars
echo ""
}