Add -l,--live flags

This commit is contained in:
natemaia 2019-08-27 01:50:42 -07:00
parent b5f9504ec8
commit 927d7ea1cf

View File

@ -15,7 +15,7 @@
: ${DIST="ArchLabs"} : ${DIST="ArchLabs"}
VER="2.0.61" # installer version VER="2.0.62" # installer version
MNT="/mnt" # install mountpoint MNT="/mnt" # install mountpoint
ANS="/tmp/ans" # dialog answer file ANS="/tmp/ans" # dialog answer file
@ -184,7 +184,7 @@ declare -A EDIT_FILES=(
[console]='/etc/vconsole.conf' [console]='/etc/vconsole.conf'
[mkinitcpio]='/etc/mkinitcpio.conf' [mkinitcpio]='/etc/mkinitcpio.conf'
[hostname]='/etc/hostname /etc/hosts' [hostname]='/etc/hostname /etc/hosts'
[bootloader]="/boot/loader/entries/$DIST.conf" [bootloader]="/boot/loader/entries/$DIST.conf" # ** based on bootloader
[locale]='/etc/locale.conf /etc/default/locale' [locale]='/etc/locale.conf /etc/default/locale'
[keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard' [keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard'
) # } ) # }
@ -2384,6 +2384,16 @@ msg()
fi fi
} }
live()
{
pacman -Syy
pacman -S $AL_BASE_PKGS archlabs-skel-openbox openbox xterm xorg-xinit xorg-server --needed --noconfirm
rm -rf /var/cache/pacman/pkg/*
cp -rf /etc/skel /root
startx
exit
}
yesno() yesno()
{ {
local title="$1" body="$2" yes='Yes' no='No' local title="$1" body="$2" yes='Yes' no='No'
@ -2604,11 +2614,13 @@ trap sigint INT
system_identify system_identify
system_devices system_devices
msg "Welcome to the $DIST Installer" "\nThis will help you get $DIST setup on your system.\nHaving previous GNU/Linux and shell experience will be an asset, however we try our best to keep things simple.\n\nIf you are unsure about an option, a default will be listed or\nthe first selected option will usually be the default (excluding language and timezone).\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle options and [Enter] to confirm.\n - Switch between buttons using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n" msg "Welcome to the $DIST Installer" "\nThis will help you get $DIST installed and setup on your system.\n\nIf you are unsure about a section the default option will be listed or\nthe first selected item will be the default.\n\n\nMenu Navigation:\n\n - Select items with the arrow keys or the option number.\n - Use [Space] to toggle options and [Enter] to confirm.\n - Switch between buttons using [Tab] or the arrow keys.\n - Use [Page Up] and [Page Down] to jump whole pages\n - Press the highlighted key of an option to select it.\n"
select_keymap || { clear; die 0; } select_keymap || { clear; die 0; }
net_connect || { msg "Not Connected" "\nThis installer requires an active internet connection.\n\nExiting..\n" 2; die 1; } net_connect || { msg "Not Connected" "\nThis installer requires an active internet connection.\n\nExiting..\n" 2; die 1; }
[[ $1 =~ (-l|--live) ]] && live
while :; do while :; do
main main
done done