From 927d7ea1cfbe9283a351c3cb18ceb3cef132020a Mon Sep 17 00:00:00 2001 From: natemaia Date: Tue, 27 Aug 2019 01:50:42 -0700 Subject: [PATCH] Add -l,--live flags --- archlabs-installer | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index e2b0c06..4251293 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -15,7 +15,7 @@ : ${DIST="ArchLabs"} -VER="2.0.61" # installer version +VER="2.0.62" # installer version MNT="/mnt" # install mountpoint ANS="/tmp/ans" # dialog answer file @@ -184,7 +184,7 @@ declare -A EDIT_FILES=( [console]='/etc/vconsole.conf' [mkinitcpio]='/etc/mkinitcpio.conf' [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' [keyboard]='/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard' ) # } @@ -2384,6 +2384,16 @@ msg() 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() { local title="$1" body="$2" yes='Yes' no='No' @@ -2604,11 +2614,13 @@ trap sigint INT system_identify 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; } net_connect || { msg "Not Connected" "\nThis installer requires an active internet connection.\n\nExiting..\n" 2; die 1; } +[[ $1 =~ (-l|--live) ]] && live + while :; do main done