From 208898cc22a93a614d7411fbe45e78ae8ac8a228 Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 17:10:39 +0100 Subject: [PATCH] progress --- etc/functions | 3 +++ etc/printing/no | 0 main.sh | 30 +++++++++++++++++++++++++----- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 etc/printing/no diff --git a/etc/functions b/etc/functions index 2f67dc2..a6e7a50 100644 --- a/etc/functions +++ b/etc/functions @@ -22,6 +22,9 @@ input_old() { } header() { + if [ "$DEBUG" ]; then + read + fi clear echo "#### $1" } diff --git a/etc/printing/no b/etc/printing/no new file mode 100644 index 0000000..e69de29 diff --git a/main.sh b/main.sh index 68cd7a6..025f9c1 100644 --- a/main.sh +++ b/main.sh @@ -250,13 +250,13 @@ profile() { reset packages cp ./etc/profile/$PROFILE $tmp_target if [ "$need_xserver" == "1" ]; then - xserver + packages xserver fi if [ "$need_gfx" == "1" ]; then - gfx + packages gfx fi if [ "$need_sound" == "1" ]; then - soundsystem + packages soundsystem fi fi } @@ -335,6 +335,25 @@ network() { 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/network/$NETWORK + packages + reset packages + cp ./etc/network/$NETWORK $tmp_target + fi +} + do_install() { header "Installation" mkdir -p ${target}/var/db/xbps/keys @@ -401,13 +420,14 @@ target_phy_id use_efi encryption_style hibernation +packages bootloader user lang hostname base -bootloader profile -printing +packages network +packages printing do_partition do_install do_chroot