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 return 0
fi 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 reset packages
cp ./etc/profile/$PROFILE $tmp_target cp ./etc/profile/$PROFILE $tmp_target
if [ "$need_xserver" == "1" ]; then if [ "$need_xserver" == "1" ]; then
packages xserver readin xserver
fi fi
if [ "$need_gfx" == "1" ]; then if [ "$need_gfx" == "1" ]; then
packages gfx readin gfx
fi fi
if [ "$need_sound" == "1" ]; then if [ "$need_sound" == "1" ]; then
packages soundsystem readin soundsystem
fi fi
fi fi
} }
@ -214,25 +214,6 @@ lang() {
fi 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() { do_install() {
header "Installation" header "Installation"
mkdir -p ${target}/var/db/xbps/keys mkdir -p ${target}/var/db/xbps/keys
@ -300,14 +281,14 @@ target_phy_id
use_efi use_efi
encryption_style encryption_style
hibernation hibernation
packages bootloader readin bootloader
user user
lang lang
hostname hostname
base base
profile profile
packages network readin network
packages printing readin printing
do_partition do_partition
do_install do_install
do_chroot do_chroot