#!/bin/bash set -e source funcs.sh log_msg INFO "Welcome to the code stolen Gentoo installer script!" log_msg INFO "$(cat <<-END This script assumes the following things: - networking works - gpt & uefi - ext4 filesystems - openrc END )" # # initial install # # make sure all scripts are executable chmod +x *.sh # configure installer export CFG_BLOCK_DEVICE="$(prompt_value "Target block device handle" "")" export CFG_PART_PREFIX="$(prompt_value "Partition number prefix (eg. 'p' for NVMe, '' for HDD/SSD)" "")" export CFG_BLOCK_PART="${CFG_BLOCK_DEVICE}${CFG_PART_PREFIX}" export CFG_PART_BOOT_SIZE="$(prompt_value "Boot partition size (in MB)" "256")" export CFG_PART_SWAP_SIZE="$(prompt_value "Swap partition size (in MB)" "4096")" export CFG_PART_ROOT_SIZE="$(prompt_value "Root partition size (in MB)" "16384")" export CFG_PART_HOME_SIZE="$(prompt_value "Home partition size (in %)" "100")%" export CFG_LLVM="$(prompt_accept "Use LLVM instead of GNU CC")" export CFG_TIMEZONE="$(prompt_value "System timezone" "America/Los_Angeles")" export CFG_LOCALE="$(prompt_value "System locale" "en_US")" export CFG_HOSTNAME="$(prompt_value "System hostname" "gentoo")" export CFG_NETWORK_INTERFACE="$(prompt_value "Network interface name" "enp0s3")" export CFG_KEYMAP="$(prompt_value "Keymap to use" "fi")" export CFG_ROOT_PASSWORD="$(prompt_value "Root user password" "")" export CFG_USER_USERNAME="$(prompt_value "Username for daily use" "gentoo")" export CFG_USER_PASSWORD="$(prompt_value "Password for your user" "")" log_msg INFO "$(cat <