This commit is contained in:
teldra 2022-02-07 17:58:29 +01:00
parent ba6af22cdd
commit 9a207c003f
2 changed files with 25 additions and 25 deletions

View File

@ -119,3 +119,22 @@ yesno() {
return 0
fi
}
readin() {
WHICH="$1"
for i in $(find ./etc/${WHICH}/ -type f); do
choice+=("$(basename $i)")
done
if [ "${#choice[@]}" -gt "1" ]; then
header "$WHICH"
multiplechoice "${choice[@]}"
elif [ "${#choice[@]}" -eq "1" ]; then
output=${choice[0]}
fi
if ! [ "${#choice[@]}" -eq "0" ]; then
. ./etc/${WHICH}/$output
packages
reset packages
cp ./etc/${WHICH}/$output $tmp_target
fi
}

31
main.sh
View File

@ -194,13 +194,13 @@ profile() {
reset packages
cp ./etc/profile/$PROFILE $tmp_target
if [ "$need_xserver" == "1" ]; then
packages xserver
readin xserver
fi
if [ "$need_gfx" == "1" ]; then
packages gfx
readin gfx
fi
if [ "$need_sound" == "1" ]; then
packages soundsystem
readin soundsystem
fi
fi
}
@ -214,25 +214,6 @@ lang() {
fi
}
packages() {
WHICH="$1"
for i in $(find ./etc/${WHICH}/ -type f); do
choice+=("$(basename $i)")
done
if [ "${#choice[@]}" -gt "1" ]; then
header "$WHICH"
multiplechoice "${choice[@]}"
elif [ "${#choice[@]}" -eq "1" ]; then
output=${choice[0]}
fi
if ! [ "${#choice[@]}" -eq "0" ]; then
. ./etc/${WHICH}/$output
packages
reset packages
cp ./etc/${WHICH}/$output $tmp_target
fi
}
do_install() {
header "Installation"
mkdir -p ${target}/var/db/xbps/keys
@ -300,14 +281,14 @@ target_phy_id
use_efi
encryption_style
hibernation
packages bootloader
readin bootloader
user
lang
hostname
base
profile
packages network
packages printing
readin network
readin printing
do_partition
do_install
do_chroot