Preserve choices made for early setup for additional runs

This commit is contained in:
natemaia 2020-05-14 21:06:50 -07:00
parent b7e6c053e1
commit e6f3e606bd

View File

@ -7,7 +7,7 @@
# shellcheck disable=SC2086,SC2046,SC2254,SC2164
VER=2.1.49
VER=2.1.50
# default values {
@ -625,32 +625,43 @@ select_mkuser()
select_keymap()
{
dlg KEYMAP menu "Keyboard" "$_keymap" \
us English cm English gb English au English gh English \
za English ng English ca French 'cd' French gn French \
tg French fr French de German at German ch German \
es Spanish latam Spanish br Portuguese pt Portuguese ma Arabic \
sy Arabic ara Arabic ua Ukrainian cz Czech ru Russian \
sk Slovak nl Dutch it Italian hu Hungarian cn Chinese \
tw Taiwanese vn Vietnamese kr Korean jp Japanese th Thai \
la Lao pl Polish se Swedish is Icelandic 'fi' Finnish \
dk Danish be Belgian in Indian al Albanian am Armenian \
bd Bangla ba Bosnian 'bg' Bulgarian dz Berber mm Burmese \
hr Croatian gr Greek il Hebrew ir Persian iq Iraqi \
af Afghani fo Faroese ge Georgian ee Estonian kg Kyrgyz \
kz Kazakh lt Lithuanian mt Maltese mn Mongolian ro Romanian \
no Norwegian rs Serbian si Slovenian tj Tajik lk Sinhala \
tr Turkish uz Uzbek ie Irish pk Urdu 'mv' Dhivehi \
np Nepali et Amharic sn Wolof ml Bambara tz Swahili \
ke Swahili bw Tswana ph Filipino my Malay tm Turkmen \
id Indonesian bt Dzongkha lv Latvian md Moldavian mao Maori \
by Belarusian az Azerbaijani mk Macedonian kh Khmer epo Esperanto \
me Montenegrin || return 1
if [[ ! -f /tmp/xkeys ]]; then
dlg KEYMAP menu "Keyboard" "$_keymap" \
us English cm English gb English au English gh English \
za English ng English ca French 'cd' French gn French \
tg French fr French de German at German ch German \
es Spanish latam Spanish br Portuguese pt Portuguese ma Arabic \
sy Arabic ara Arabic ua Ukrainian cz Czech ru Russian \
sk Slovak nl Dutch it Italian hu Hungarian cn Chinese \
tw Taiwanese vn Vietnamese kr Korean jp Japanese th Thai \
la Lao pl Polish se Swedish is Icelandic 'fi' Finnish \
dk Danish be Belgian in Indian al Albanian am Armenian \
bd Bangla ba Bosnian 'bg' Bulgarian dz Berber mm Burmese \
hr Croatian gr Greek il Hebrew ir Persian iq Iraqi \
af Afghani fo Faroese ge Georgian ee Estonian kg Kyrgyz \
kz Kazakh lt Lithuanian mt Maltese mn Mongolian ro Romanian \
no Norwegian rs Serbian si Slovenian tj Tajik lk Sinhala \
tr Turkish uz Uzbek ie Irish pk Urdu 'mv' Dhivehi \
np Nepali et Amharic sn Wolof ml Bambara tz Swahili \
ke Swahili bw Tswana ph Filipino my Malay tm Turkmen \
id Indonesian bt Dzongkha lv Latvian md Moldavian mao Maori \
by Belarusian az Azerbaijani mk Macedonian kh Khmer epo Esperanto \
me Montenegrin || return 1
if [[ $CMAPS == *"$KEYMAP "* ]]; then
CMAP="$KEYMAP"
echo "$KEYMAP" > /tmp/xkeys
else
dlg CMAP menu "Console Keymap" "$_vconsole" $CMAPS || return 1
KEYMAP="$(< /tmp/xkeys)"
fi
if [[ ! -f /tmp/ckeys ]]; then
if [[ $CMAPS == *"$KEYMAP "* ]]; then
CMAP="$KEYMAP"
else
dlg CMAP menu "Console Keymap" "$_vconsole" $CMAPS || return 1
fi
echo "$CMAP" > /tmp/ckeys
else
CMAP="$(< /tmp/ckeys)"
fi
if [[ $TERM == 'linux' ]]; then
@ -3313,7 +3324,10 @@ else
done
fi
msg "Welcome to the $DIST Installer" "$_welcome"
if [[ ! -f /tmp/welcomed ]]; then
msg "Welcome to the $DIST Installer" "$_welcome"
touch /tmp/welcomed
fi
if ! select_keymap; then
clear