From 20844b63421bc0b3c3539758147594b70face3e5 Mon Sep 17 00:00:00 2001 From: natemaia Date: Wed, 5 May 2021 15:44:00 -0700 Subject: [PATCH] Add option to skip font selection --- installer | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/installer b/installer index 7510bef..1f648ba 100755 --- a/installer +++ b/installer @@ -6,7 +6,7 @@ # AIF, Calamares, and the Arch Wiki.. Credit where credit is due # shellcheck disable=SC2086,SC2046,SC2254,SC2164 -VER=2.6 +VER=2.7 # default values { @@ -3116,6 +3116,7 @@ usage() options: -h print this message and exit + -f skip setting the font size -l install and setup a live session -D enable xtrace and log output to $DBG -c disable network connection tests @@ -3520,7 +3521,7 @@ fi trap 'printf "\n^C\n" && die 1' INT -while getopts ":htcnrD:b:m:d:l:" OPT; do +while getopts ":htcnrfD:b:m:d:l:" OPT; do case "$OPT" in D) debug ;; h) usage "$0" ;; @@ -3529,6 +3530,7 @@ while getopts ":htcnrD:b:m:d:l:" OPT; do m) MNT="$OPTARG" ;; d) DIST="$OPTARG" ;; c) NONET=true ;; + f) NOFONT=true ;; r) if [[ ! -b $OPTARG ]]; then msg "Invalid Root" "\nThe installer expects a full path to a block device for root, e.g. /dev/sda2.\n\nExiting..\n" 2 @@ -3580,23 +3582,25 @@ if [[ $NOMOUNT ]]; then fi fi -if [[ $TERM == 'linux' ]]; then - if [[ -f /tmp/font ]]; then - FONT="$(< /tmp/font)" - : "${FONT=ter-i16n}" - setfont "$FONT" - else - fontsize=16 - while [[ $TERM == 'linux' && ! -f /tmp/font ]]; do - dlg fontsize menu "Font Size" "\nSelect a font size from the list below.\n\ndefault: 16" \ - 12 "setfont ter-i12n" 14 "setfont ter-i14n" 16 "setfont ter-i16n" 18 "setfont ter-i18n" \ - 20 "setfont ter-i20n" 22 "setfont ter-i22n" 24 "setfont ter-i24n" 28 "setfont ter-i28n" \ - 32 "setfont ter-i32n" || break - - FONT="ter-i${fontsize}n" +if [[ -z $NOFONT ]]; then + if [[ $TERM == 'linux' ]]; then + if [[ -f /tmp/font ]]; then + FONT="$(< /tmp/font)" + : "${FONT=ter-i16n}" setfont "$FONT" - yesno "Font Size" "\nKeep the currently set font size?\n" && echo "ter-i${fontsize}n" > /tmp/font - done + else + fontsize=16 + while [[ $TERM == 'linux' && ! -f /tmp/font ]]; do + dlg fontsize menu "Font Size" "\nSelect a font size from the list below.\n\ndefault: 16" \ + 12 "setfont ter-i12n" 14 "setfont ter-i14n" 16 "setfont ter-i16n" 18 "setfont ter-i18n" \ + 20 "setfont ter-i20n" 22 "setfont ter-i22n" 24 "setfont ter-i24n" 28 "setfont ter-i28n" \ + 32 "setfont ter-i32n" || break + + FONT="ter-i${fontsize}n" + setfont "$FONT" + yesno "Font Size" "\nKeep the currently set font size?\n" && echo "ter-i${fontsize}n" > /tmp/font + done + fi fi fi