Clean up a number of functions, ensure make is installed for dwm

This commit is contained in:
natemaia 2018-12-04 00:10:11 -08:00
parent b1243fcba1
commit 04c4441fc5
6 changed files with 25 additions and 10 deletions

View File

@ -121,7 +121,7 @@ _KernelBody="\nSelect which kernel to use for the install."
# base-devel # base-devel
_DevelTitle="Install base-devel packages" _DevelTitle="Install base-devel packages"
_DevelBody="\nDo you want base-devel installed for building AUR packages?" _DevelBody="\nDo you want base-devel installed for compiling and building packages?"
# shell # shell
_ShellTitle="Choose Login Shell" _ShellTitle="Choose Login Shell"

View File

@ -1,23 +1,27 @@
#!/usr/bin/bash #!/usr/bin/bash
# vim:ft=sh:fdm=marker:fmr={,} # vim:ft=sh:fdm=marker:fmr={,}
# shellcheck disable=2034
# archlabs installer library script file # archlabs installer library script file
# this file is not meant to be run directly # this file is not meant to be run directly
# sourcing this file in a non bash shell is not advised # sourcing this file in a non bash shell is not advised
declare -gA BCMDS=( # command used to install each bootloader, this can be modified later to fit the system
declare -Ag BCMDS=(
[syslinux]="syslinux-install_update -iam" [syslinux]="syslinux-install_update -iam"
[grub]="grub-install --recheck --force" [grub]="grub-install --recheck --force"
[systemd-boot]="bootctl --path=/boot install" [systemd-boot]="bootctl --path=/boot install"
) )
# readonly boot partition mount points for each bootloader
declare -Agr BMNTS=( declare -Agr BMNTS=(
[UEFI-grub]="/boot/efi" [UEFI-systemd-boot]="/boot" [BIOS-grub]="/boot" [UEFI-grub]="/boot/efi" [UEFI-systemd-boot]="/boot" [BIOS-grub]="/boot"
[BIOS-syslinux]="/boot" [UEFI-syslinux]="/boot" [BIOS-syslinux]="/boot" [UEFI-syslinux]="/boot"
) )
declare -Agrx BOOTLDRS=( # readonly bootloader options with respective boot partition mountpoint
declare -Agr BOOTLDRS=(
[BIOS]="grub ${BMNTS[BIOS-grub]} syslinux ${BMNTS[BIOS-syslinux]}" [BIOS]="grub ${BMNTS[BIOS-grub]} syslinux ${BMNTS[BIOS-syslinux]}"
[UEFI]="systemd-boot ${BMNTS[UEFI-systemd-boot]} grub ${BMNTS[UEFI-grub]} syslinux ${BMNTS[UEFI-syslinux]}" [UEFI]="systemd-boot ${BMNTS[UEFI-systemd-boot]} grub ${BMNTS[UEFI-grub]} syslinux ${BMNTS[UEFI-syslinux]}"
) )

View File

@ -57,6 +57,7 @@ declare -gA WM_EXT=(
[openbox]="archlabs-obkey obconf archlabs-kickshaw tint2 archlabs-oblogout jgmenu tint2 archlabs-skippy-xd conky thunar termite libmpdclient jsoncpp archlabs-screenlock archlabs-paranoid archlabs-polybar rofi" [openbox]="archlabs-obkey obconf archlabs-kickshaw tint2 archlabs-oblogout jgmenu tint2 archlabs-skippy-xd conky thunar termite libmpdclient jsoncpp archlabs-screenlock archlabs-paranoid archlabs-polybar rofi"
) )
# files the user can edit during the final stage of install
declare -gA EDIT_FILES=( declare -gA EDIT_FILES=(
[2]="/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard /etc/vconsole.conf" [2]="/etc/X11/xorg.conf.d/00-keyboard.conf /etc/default/keyboard /etc/vconsole.conf"
[3]="/etc/locale.conf /etc/default/locale" [3]="/etc/locale.conf /etc/default/locale"
@ -67,7 +68,7 @@ declare -gA EDIT_FILES=(
[8]="/etc/crypttab" [8]="/etc/crypttab"
[9]="/etc/default/grub" [9]="/etc/default/grub"
[10]="/etc/pacman.conf" [10]="/etc/pacman.conf"
[11]="" # empty login files, we don't know /home/USER?/FILES? [11]="" # login files populated later, /home/USER?/FILES? ... lightdm?
) )
# } # }

View File

@ -326,17 +326,25 @@ package_operations()
find $MNT/boot/ -name 'syslinux*' -exec rm -rf '{}' \; >/dev/null 2>&1 find $MNT/boot/ -name 'syslinux*' -exec rm -rf '{}' \; >/dev/null 2>&1
fi fi
# iputils, base-devel, and git are all needed and should always be installed separately
chrun "pacman -Syyu --noconfirm" chrun "pacman -Syyu --noconfirm"
# base-devel and git are the users choice
if [[ $BASEDEV == true ]]; then if [[ $BASEDEV == true ]]; then
chrun "pacman -S iputils --noconfirm; pacman -S base-devel git --needed --noconfirm" 2>/dev/null chrun "pacman -S iputils --noconfirm" 2>/dev/null
chrun "pacman -S base-devel git --needed --noconfirm" 2>/dev/null
elif [[ $BASEDEV == false && $INSTALL_WMS =~ dwm ]]; then elif [[ $BASEDEV == false && $INSTALL_WMS =~ dwm ]]; then
chrun "pacman -S iputils git --noconfirm" chrun "pacman -S iputils git make --noconfirm" 2>/dev/null
else else
chrun "pacman -S iputils --noconfirm" # iputils is needed and should always be installed
chrun "pacman -S iputils --noconfirm" 2>/dev/null
fi fi
# install chosen packages
chrun "pacman -S $inpkg --needed --noconfirm" chrun "pacman -S $inpkg --needed --noconfirm"
# remove packages: installer, linux?, grub?
chrun "pacman -Rs $rmpkg --noconfirm" chrun "pacman -Rs $rmpkg --noconfirm"
return 0 return 0
} }

View File

@ -6,10 +6,10 @@
# this file is not meant to be run directly # this file is not meant to be run directly
# sourcing this file in a non bash shell is not advised # sourcing this file in a non bash shell is not advised
# shellcheck disable=2154 # shellcheck disable=2154,2034
declare -g LUKS="" declare -g LUKS=""
declare -gx LUKS_DEV="" declare -g LUKS_DEV=""
declare -g LUKS_PART="" declare -g LUKS_PART=""
declare -g LUKS_PASS="" declare -g LUKS_PASS=""
declare -g LUKS_UUID="" declare -g LUKS_UUID=""

View File

@ -154,6 +154,8 @@ system_checks()
rmmod wl >/dev/null 2>&1 rmmod wl >/dev/null 2>&1
modprobe wl >/dev/null 2>&1 modprobe wl >/dev/null 2>&1
export BROADCOM_WL=true export BROADCOM_WL=true
printf "\nLoading wifi kernel modules please wait...\n"
sleep 2
fi fi
if ! curl -s --head 'https://www.archlinux.org/mirrorlist/all/' | sed '1q' | grep -qw '200'; then if ! curl -s --head 'https://www.archlinux.org/mirrorlist/all/' | sed '1q' | grep -qw '200'; then