From 5f2d2ba8852a68b0603d3eba9d36b79e3915cb46 Mon Sep 17 00:00:00 2001 From: natemaia Date: Fri, 18 Jan 2019 21:55:47 -0800 Subject: [PATCH] Move outdated translations to a subdir, update readme --- README.md | 5 +--- lang/english.trans | 26 +++++++++---------- lang/{ => needupdate}/chinese.trans | 0 lang/{ => needupdate}/dutch.trans | 0 lang/{ => needupdate}/french.trans | 0 lang/{ => needupdate}/hungarian.trans | 0 lang/{ => needupdate}/italian.trans | 0 lang/{ => needupdate}/p_brasil.trans | 0 lang/{ => needupdate}/portuguese.trans | 0 lang/{ => needupdate}/russian.trans | 0 lang/{ => needupdate}/spanish.trans | 0 src/archlabs-installer | 36 ++++++++++++-------------- 12 files changed, 30 insertions(+), 37 deletions(-) rename lang/{ => needupdate}/chinese.trans (100%) rename lang/{ => needupdate}/dutch.trans (100%) rename lang/{ => needupdate}/french.trans (100%) rename lang/{ => needupdate}/hungarian.trans (100%) rename lang/{ => needupdate}/italian.trans (100%) rename lang/{ => needupdate}/p_brasil.trans (100%) rename lang/{ => needupdate}/portuguese.trans (100%) rename lang/{ => needupdate}/russian.trans (100%) rename lang/{ => needupdate}/spanish.trans (100%) diff --git a/README.md b/README.md index 116634b..5f4a0ba 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,8 @@ #### Features - LUKS/LVM setup +- Package & Session selection - Full device auto partition -- Package selection -- Error detection -- Written in Bash -- Fast Install _(~6min)_ #### Requirements diff --git a/lang/english.trans b/lang/english.trans index 1717961..974029e 100644 --- a/lang/english.trans +++ b/lang/english.trans @@ -23,7 +23,7 @@ _Not64Bit="\nThis installer only supports x86_64 capable machines.\n" _NoNetwork="\nThis installer needs to be run with an active internet connection in order to update and install packages.\n" # Preparation Menu -_PrepTitle="Prep for Install" +_PrepTitle="Prepare Install" _PrepBody="\nThis is the menu in which you will prepare your system for the install.\n\nTo begin the install you must first have:\n\n - A root (/) partition mounted (UEFI systems also require a seperate boot partition).\n - A user created and the passwords set.\n - The system settings configured." _PrepLayout="Keyboard Layout" _PrepShowDev="Show lsblk output (optional)" @@ -67,7 +67,7 @@ _WMChoice="Sessions" _WMChoiceBody="\nUse [Space] to toggle available sessions.\n\nFor all sessions a basic package set will be installed for basic compatibilty across sessions. In addition to this extra packages specific to each sessions will also be installed to provide basic functionality most people expect from an environment." _Packages="Additional Packages" -_PackageMenu="\nSelect a category to choose packages from, once finished select '$_Done' to return to the main menu." +_PackageMenu="\nSelect a category to choose packages from, once finished select the last entery or press [Esc] to return to the main menu." _PackageBody="\nUse [Space] to toggle packages(s) and press [Enter] to accept the selection.\n\nNOTE: Some packages may already be installed by your desktop environment (if any). Extra packages may also be installed for the selected packages eg. Selecting qutebrowser will also install qt5ct (the Qt5 theme tool) and qt5-styleplugins (for Gtk themes in Qt applications)." # login setup @@ -77,10 +77,10 @@ _AutoLoginBody="\nDo you want auto login+startx enabled?" _WMLoginBody="\nSelect which to use as your primary login session.\n\nThis can be changed by editing your ~/.xinitrc." # Set keymap, hwclock, local and timezone -_CMapTitle="Console Keymap" -_CMapBody="\nSelect console keymap, the console is the tty shell you reach before starting a graphical environment (usually Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nDefault: us" -_XMapBody="\nPick your system keymap from the list below\n\nThis is the keymap used once a graphical environment is running (usually Xorg). If a matching console keymap exists it will be used, otherwise you will be asked to select one for that as well.\n\nDefault: us" +_XMapBody="\nPick your system keymap from the list below\n\nThis is the keymap used once a graphical environment is running (usually Xorg).\n\nSystem default: us" _LocaleBody="\nLocale determines the system language and currency formats.\n\nThe format for locale names is languagecode_COUNTRYCODE\n\neg. en_US is: english United States\n en_GB is: english Great Britain" +_CMapTitle="Console Keymap" +_CMapBody="\nSelect console keymap, the console is the tty shell you reach before starting a graphical environment (usually Xorg).\n\nIts keymap is seperate from the one used by the graphical environments, though many do use the same such as 'us' English.\n\nSystem default: us" # Configure _ConfHost="Hostname" @@ -100,12 +100,12 @@ _MntTitle="Mount Status" _MntFail="\nMount Failed!\n" _MntSucc="\nMount Succeeded!\n" _MntConfBody="\nConfirm mount options:" -_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nDuring mounting, partitions can be mounted without formatting by selecting '$_Skip'.\nThis can be useful for data partitions or previously formatted partitions.\n\nThe one exception to this is the root (/) partition, it must be formatted before unpacking to ensure the system stability.\n" _MntBody="\nUse [Space] to toggle mount options from below, press [Enter] when done to confirm selection.\n\nNot selecting any and confirming will run an automatic mount." +_WarnMount="\nIMPORTANT: Please choose carefully during mounting and formatting.\n\nDuring mounting, partitions can be mounted without formatting by selecting '$_Skip'.\nThis can be useful for data partitions or partitions you've already formatted.\n\nThe one exception is the root (/) partition, it needs to be formatted before install to ensure the system stability.\n" # Select Device _DevSelTitle="Device Selection" -_DevSelBody="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb ..." +_DevSelBody="\nSelect a device to use from the list below.\n\nDevices (/dev) are the available drives on the system. /sda, /sdb, /sdc ..." # Extra Partitions _ExtPartBody="\nYou can now select additional partitions you want mounted, once choosen you will be asked to enter a mountpoint.\n\nSelect '$_Done' to finish the mounting step and return to the main menu." @@ -121,16 +121,16 @@ _ShellBody="\nChoose a shell for the new user and root." # Partitioning Menu _PartTitle="Partitioning" -_PartWipe="Secure Wipe" -_PartAuto="Automatic Partitioning" -_PartShowTree="Show Partition Table" +_PartWipe="Secure wipe" +_PartAuto="Automatic partitioning" +_PartShowTree="Show partition Table" _PartBody="\nFull device auto partitioning is available for beginners otherwise cfdisk is recommended.\n\n - UEFI systems require a vfat/fat32 partition between 100-512M in size to be mounted at /boot or /boot/efi\n - BIOS systems using LUKS will also require this but it does NOT require vfat/fat32 formatting." # Auto partition -_PartBody1="\nWARNING:\n\nALL data on" +_PartBody1="\nWARNING: ALL data on" _PartBody2="will be destroyed and the following partitions will be created\n\n- A 512M vfat/fat32 boot partition with boot flags enabled.\n- An ext4 partition using all remaining space" _PartBody3="\n\nDo you want to continue?\n" -_PartWipeBody="will be destroyed using 'wipe -Ifre'.\n\nThis is ONLY intended for use on devices before sale or disposal to reliably destroy your data beyond recovery by filling it with random data multiple times. This is NOT for devices you intend to continue using.\nThe wiping process can take a long time depending on the size and speed of the drive.\n\nDo you still want to continue?\n" +_PartWipeBody="will be destroyed using 'wipe -Ifre'.\n\nThis is ONLY intended for use on devices before sale or disposal to reliably destroy the data beyond recovery. This is NOT for devices you intend to continue using.\nThe wiping process can take a long time depending on the size and speed of the drive.\n\nDo you still want to continue?\n" # bootloader _InstSysTitle="Install Syslinux" @@ -149,7 +149,7 @@ _SelSwpErr="Swap Setup Error: Must be 1(M|G) or greater, and can only contain wh _SelSwpSize="\nEnter the size to use for swap in MB or GB.\n\nFor ease of use and as an example the size has been filled in to the size of your system memory (RAM).\n\nMust be greater than 1, end in either M or G, and contain only whole numbers." _SelUefiBody="\nSelect the system EFI boot partition.\n\nThis is a required partition for booting UEFI systems. It's usually the first partition on the drive, less than 512M, and will be formatted as vfat/fat32 if not already." -_FormUefiBody="IMPORTANT:\n\nThe EFI partition" +_FormUefiBody="\nIMPORTANT: The EFI partition" _FormUefiBody2="is already formatted as vfat/fat32.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n" _FormBiosBody="IMPORTANT:\n\nThe boot partition" _FormBiosBody2="is already formatted as ext3/4.\n\nFor a clean install, previously existing partitions should be reformatted, however this removes ALL data (bootloaders) on the partition so choose carefully.\n\nDo you want to reformat the partition?\n" diff --git a/lang/chinese.trans b/lang/needupdate/chinese.trans similarity index 100% rename from lang/chinese.trans rename to lang/needupdate/chinese.trans diff --git a/lang/dutch.trans b/lang/needupdate/dutch.trans similarity index 100% rename from lang/dutch.trans rename to lang/needupdate/dutch.trans diff --git a/lang/french.trans b/lang/needupdate/french.trans similarity index 100% rename from lang/french.trans rename to lang/needupdate/french.trans diff --git a/lang/hungarian.trans b/lang/needupdate/hungarian.trans similarity index 100% rename from lang/hungarian.trans rename to lang/needupdate/hungarian.trans diff --git a/lang/italian.trans b/lang/needupdate/italian.trans similarity index 100% rename from lang/italian.trans rename to lang/needupdate/italian.trans diff --git a/lang/p_brasil.trans b/lang/needupdate/p_brasil.trans similarity index 100% rename from lang/p_brasil.trans rename to lang/needupdate/p_brasil.trans diff --git a/lang/portuguese.trans b/lang/needupdate/portuguese.trans similarity index 100% rename from lang/portuguese.trans rename to lang/needupdate/portuguese.trans diff --git a/lang/russian.trans b/lang/needupdate/russian.trans similarity index 100% rename from lang/russian.trans rename to lang/needupdate/russian.trans diff --git a/lang/spanish.trans b/lang/needupdate/spanish.trans similarity index 100% rename from lang/spanish.trans rename to lang/needupdate/spanish.trans diff --git a/src/archlabs-installer b/src/archlabs-installer index 3123605..1ada1ae 100755 --- a/src/archlabs-installer +++ b/src/archlabs-installer @@ -8,7 +8,7 @@ # Some ideas and code has been taken from other installers # AIF, Cnichi, Calamares, The Arch Wiki.. Credit where credit is due -VER="1.8.36" # version +VER="1.8.37" # version DIST="ArchLabs" # distributor MNT="/mnt" # install mountpoint @@ -261,8 +261,7 @@ show_cfg() { local cmd="${BCMDS[$BOOTLDR]}" local mnt="${BMNTS[$SYS-$BOOTLDR]}" - local pkgs="${USER_PKGS# } ${PACKAGES# } $BASE_PKGS" - [[ $PACKAGES =~ (openbox|bspwm|i3-gaps) || $INSTALL_WMS == *dwm* ]] && pkgs="${pkgs# } $WM_BASE_PKGS" + local pkgs="${USER_PKGS# } ${PACKAGES# }" [[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu ${pkgs# }" pkgs="${pkgs# }" pkgs="${pkgs% }" @@ -504,6 +503,8 @@ select_sessions() for i in $WM_PACKAGES; do [[ $PACKAGES == *$i* ]] || PACKAGES+=" ${WM_PACKAGES# }" done + + return 0 } select_login() @@ -879,7 +880,7 @@ partition() elif [[ $choice != "$_PartWipe" && $choice != "$_PartAuto" && $choice != "$_PartShowTree" ]]; then clear; tput cnorm; $choice "$device"; partition "$device" elif [[ $choice == "$_PartShowTree" ]]; then - msgbox "$_PartTitle" "\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT "$device")\n" + msgbox "$_PartTitle" "\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT "$device")\n\n" partition "$device" elif [[ $choice == "$_PartWipe" ]]; then yesno "$_PartWipe" "$_PartBody1 $device $_PartWipeBody" && wipe -Ifrev $device @@ -939,13 +940,13 @@ device_tree() tput civis local msg if [[ $IGNORE_DEV != "" ]]; then - msg="$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT | + msg="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | awk "!/$IGNORE_DEV/"' && /disk|part|lvm|crypt|NAME/')" else - msg="$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE,MOUNTPOINT | + msg="$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE,MOUNTPOINT | awk '/disk|part|lvm|crypt|NAME/')" fi - msgbox "$_PrepShowDev" "$msg" + msgbox "$_PrepShowDev" "\n\n$msg\n\n" } select_device() @@ -1074,7 +1075,7 @@ auto_partition() tput civis sleep 0.5 - msgbox "$_PrepParts" "\nAuto partitioning complete.\n\n$(lsblk -o NAME,MODEL,TYPE,FSTYPE,SIZE $device)" + msgbox "$_PrepParts" "\nAuto partitioning complete.\n\n$(lsblk -o NAME,MODEL,SIZE,TYPE,FSTYPE $device)\n" } mount_partition() @@ -2293,7 +2294,7 @@ luks_show() { tput civis sleep 0.5 - msgbox "$_LuksEncrypt" "${_LuksEncryptSucc}\n$(lsblk $LUKS_PART -o NAME,MODEL,TYPE,FSTYPE,SIZE)\n" + msgbox "$_LuksEncrypt" "${_LuksEncryptSucc}\n\n$(lsblk $LUKS_PART -o NAME,MODEL,SIZE,TYPE,FSTYPE)\n\n" } luks_keyfile() @@ -2329,15 +2330,6 @@ json() curl -s "http://api.ipstack.com/$2" | python3 -c "import sys, json; print(json.load(sys.stdin)['$1'])" } -src() -{ - if ! . "$1" 2>/dev/null; then - printf "Failed to source file %s\n" "$1" - die 1 - fi - return 0 -} - is_ssd() { local i dev=$1 @@ -2626,12 +2618,16 @@ for arg in "$@"; do [[ $arg =~ (--debug|-d) ]] && debug done -src /usr/share/archlabs/installer/lang/english.trans +if ! . /usr/share/archlabs/installer/lang/english.trans 2>/dev/null; then + printf "Failed to source dialog text file\n" + die 1 +fi + system_checks system_identify system_devices msgbox "$_WelTitle $DIST Installer" "$_WelBody" -select_keymap || die 0 +select_keymap || { clear; die 0; } while true; do main