Fix variable mismatch in translation files

This commit is contained in:
natemaia
2018-08-25 20:49:06 -07:00
parent 9188204758
commit d97736a344
11 changed files with 36 additions and 37 deletions

View File

@ -14,7 +14,7 @@
# immutable variables {
readonly DIST="Archlabs" # Linux distributor
readonly VER="1.6.43" # Installer version
readonly VER="1.6.45" # Installer version
readonly LIVE="liveuser" # Live session user
readonly TRN="/usr/share/archlabs-installer" # Translation path
readonly MNT="/mnt/install" # Install mountpoint
@ -298,7 +298,8 @@ check_install_ready() {
getinput() {
local answer
answer="$(dialog --cr-wrap --max-input 63 --stdout --backtitle "$BT" --title " $1 " --inputbox "$2" 0 0 "$3")"
answer="$(dialog --cr-wrap --max-input 63 --stdout --no-cancel \
--backtitle "$BT" --title " $1 " --inputbox "$2" 0 0 "$3")"
[[ $? != 0 || $answer == "" ]] && return 1
echo "$answer"
}
@ -363,7 +364,7 @@ oneshot() {
set_keymap() {
tput civis
declare -g KEYMAP
KEYMAP="$(dialog --cr-wrap --stdout \
KEYMAP="$(dialog --cr-wrap --stdout --no-cancel \
--backtitle "$DIST Installer - (x86_64) - Version $VER" \
--title " $_PrepLayout " --menu "$_XMapBody" 20 70 12 $KEYMAPS)"
[[ $? != 0 || $KEYMAP == "" ]] && return 1
@ -371,7 +372,7 @@ set_keymap() {
# when a matching console map is not available open a selection dialog
if ! [[ $CONSOLE_MAPS =~ "$KEYMAP -" ]]; then
tput civis
CONSOLE_MAP="$(dialog --cr-wrap --stdout \
CONSOLE_MAP="$(dialog --cr-wrap --stdout --no-cancel \
--backtitle "$DIST Installer - (x86_64) - Version $VER" \
--title " $_CMapTitle " --menu "$_CMapBody" 20 70 12 $CONSOLE_MAPS)"
[[ $? != 0 || $CONSOLE_MAP == "" ]] && return 1
@ -489,7 +490,7 @@ window_manager() {
"openbox" "A lightweight, powerful, and highly configurable stacking window manager" off \
"bspwm" "A tiling window manager that represents windows as the leaves of a binary tree" off \
"i3-gaps" "A fork of i3 window manager with more features including gaps" off \
"dwm" "A customized fork of dwm with patches and modifications" off \
"dwm" "A customized fork of dwm, with patches and modifications" off \
"gnome" "A desktop environment that aims to be simple and easy to use" off \
"cinnamon" "A desktop environment combining a traditional desktop layout with modern graphical effects" off \
"xfce4" "A lightweight and modular desktop environment based on GTK+ 2 and 3" off)"
@ -541,7 +542,7 @@ window_manager() {
}
extra_packages() {
EXTRA_PACKAGES="$(dialog --cr-wrap --stdout --backtitle "$BT" \
EXTRA_PACKAGES="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
--title " $_WMChoice " --checklist "$_WMChoiceBody\n" 0 0 20 \
"firefox" "A popular open-source graphical web browser from Mozilla" off \
"chromium" "an open-source graphical web browser based on the Blink rendering engine" off \
@ -644,7 +645,6 @@ mirrorlist_cmd() {
local country
country="$(dialog --cr-wrap --stdout --no-cancel --backtitle "$BT" \
--title "$_MirrorTitle" --menu "$_MirrorCountry" 22 70 10 $countries)"
[[ $? != 0 || $country == "" ]] && return 1
MIRROR_CMD="reflector --country $country --score 80 --latest 40 --fastest 10 --sort rate"
fi
@ -662,8 +662,6 @@ mirrorlist_cmd() {
tput cnorm
MIRROR_CMD="$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_MirrorTitle " --inputbox "$_MirrorCmd\n\n$ref\n" 0 0 "$cmd")"
[[ $? != 0 || $MIRROR_CMD == "" ]] && return 1
return 0
}
@ -1825,17 +1823,15 @@ update_system() {
pkgcmd="pacman -S iputils --noconfirm ; pacman -S base-devel git --needed --noconfirm"
fi
pkgcmd="pacman -Rs archlabs-installer --noconfirm ; $pkgcmd"
if ! grep -qi "hypervisor" <<< "$(dmesg)"; then
pkgcmd="pacman -Rs archlabs-installer virtualbox-guest-utils virtualbox-guest-modules-arch --noconfirm ; $pkgcmd"
else
pkgcmd="pacman -Rs archlabs-installer --noconfirm ; $pkgcmd"
pkgcmd="pacman -Rs virtualbox-guest-utils virtualbox-guest-modules-arch --noconfirm ; $pkgcmd"
fi
if [[ $BOOTLOADER == 'grub' && $KERNEL == 'linux-lts' ]]; then
pkgcmd="$pkgcmd; grub-mkconfig -o /boot/grub/grub.cfg"
elif [[ $BOOTLOADER != 'grub' ]]; then
pkgcmd="$pkgcmd; pacman -Rs grub --noconfirm"
rm -rf $MNT/etc/default/grub
if [[ $BOOTLOADER != 'grub' ]]; then
pkgcmd="$pkgcmd ; pacman -Rs grub --noconfirm"
rm -f $MNT/etc/default/grub
find $MNT/boot/ -name 'grub*' -exec rm -rf '{}' \; >/dev/null 2>&1
fi
@ -1860,16 +1856,14 @@ install_packages() {
REMOVE_PKGS="$(pacman -Qssq 'xfce4*' 2>/dev/null)"
fi
if [[ $INSTALL_WMS =~ dwm ]]; then
oldPWD="$PWD"
if [[ $INSTALL_WMS =~ dwm && -d $MNT/home/$NEWUSER ]]; then
mkdir -p $MNT/home/$NEWUSER/suckless
for n in dwm st dmenu; do
git clone https://bitbucket.org/natemaia/$n $MNT/home/$NEWUSER/suckless/$n
cd $MNT/home/$NEWUSER/suckless/$n
make clean install && make clean
echo -e "\n$n has been installed..\n\nSee /home/$NEWUSER/suckless/$n to customize and rebuild\n"
for prog in dwm st dmenu; do
echo -e "\nInstalling $prog..\n"
git clone https://bitbucket.org/natemaia/$prog $MNT/home/$NEWUSER/suckless/$prog
chroot_cmd "cd /home/$NEWUSER/suckless/$prog && make clean install && make clean"
echo -e "\n$prog has been installed..\n\nSee /home/$NEWUSER/suckless/$prog to customize and rebuild\n"
done
cd "$oldPWD"
fi
local pkgcmd="pacman -S $pkgs --needed --noconfirm"
@ -2227,8 +2221,8 @@ main() {
tput civis
MENU_HIGHLIGHT=$(dialog --cr-wrap --no-cancel --stdout --backtitle "$BT" \
--title " $_PrepTitle " --default-item $MENU_HIGHLIGHT --menu "$_PrepBody" 0 0 0 \
"1" "$_PrepShowDev" "2" "$_PrepParts" "3" "$_PrepLUKS" "4" "$_PrepLVM" \
"5" "$_PrepMount" "6" "$_PrepConfig" "7" "$_InstTitle" "8" "$_Done")
"1" "$_PrepShowDev" "2" "$_PrepParts" "3" "$_PrepLUKS" "4" "$_PrepLVM" \
"5" "$_PrepMount" "6" "$_PrepConfig" "7" "$_PrepInstall" "8" "$_Done")
# if trying to install the system, make sure the partitions are mounted
# and that the needed config variables and user variables have been set up