You've already forked al-installer
Add special case for neovim
This commit is contained in:
@ -181,13 +181,6 @@ EOF
|
||||
install_bootloader() {
|
||||
chroot_cmd "export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/core_perl"
|
||||
|
||||
local ucode=""
|
||||
if [[ $(grep 'GenuineIntel' /proc/cpuinfo) && -e $MNT/boot/intel-ucode.img ]]; then
|
||||
ucode="/intel-ucode.img"
|
||||
elif [[ $(grep 'AuthenticAMD' /proc/cpuinfo) && -e $MNT/boot/amd-ucode.img ]]; then
|
||||
ucode="/amd-ucode.img"
|
||||
fi
|
||||
|
||||
# if not on an LVM we can use the UUID for booting
|
||||
if ! [[ $ROOT_PART =~ /dev/mapper ]]; then
|
||||
ROOT_PART_ID="UUID=$(blkid -s PARTUUID $ROOT_PART | sed 's/.*=//g; s/"//g')"
|
||||
@ -199,7 +192,7 @@ install_bootloader() {
|
||||
|
||||
# needed for os-prober module to work properly in the chroot
|
||||
mkdir -p $MNT/run/udev && mount --bind /run/udev $MNT/run/udev
|
||||
# BCMDS[$BOOTLDR]="mkdir -p /run/udev && mount --bind /run/udev /run/udev ; ${BCMDS[$BOOTLDR]}"
|
||||
BCMDS[$BOOTLDR]="mkdir -p /run/udev && mount --bind /run/udev /run/udev ; ${BCMDS[$BOOTLDR]}"
|
||||
|
||||
if [[ $SYS == 'UEFI' ]]; then
|
||||
# make sure efivarfs has been mounted
|
||||
@ -214,6 +207,12 @@ install_bootloader() {
|
||||
-type d -exec rm -rf '{}' \; >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
local ucode=""
|
||||
if [[ $(grep 'GenuineIntel' /proc/cpuinfo) && -e $MNT/boot/intel-ucode.img ]]; then
|
||||
ucode="/intel-ucode.img"
|
||||
elif [[ $(grep 'AuthenticAMD' /proc/cpuinfo) && -e $MNT/boot/amd-ucode.img ]]; then
|
||||
ucode="/amd-ucode.img"
|
||||
fi
|
||||
# sets up the bootloader config(s) and ${BCMDS[$BOOTLDR]}
|
||||
prep_for_$BOOTLDR "$ucode"
|
||||
|
||||
|
@ -14,10 +14,7 @@ install_main() {
|
||||
check_for_errors "genfstab -U $MNT > $MNT/etc/fstab"
|
||||
|
||||
# touch up fstab if we used a swapfile
|
||||
if [[ -f $MNT/swapfile ]]; then
|
||||
sed -i "s~${MNT}~~" $MNT/etc/fstab 2>$ERR
|
||||
check_for_errors "sed -i s~${MNT}~~ $MNT/etc/fstab"
|
||||
fi
|
||||
[[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" $MNT/etc/fstab
|
||||
|
||||
# update the mirrorlist, if this isn't done before updating or it may be slow
|
||||
local cmdtail="--verbose --save $MNT/etc/pacman.d/mirrorlist"
|
||||
@ -41,7 +38,7 @@ install_main() {
|
||||
install_base() {
|
||||
clear
|
||||
tput cnorm
|
||||
echo -e "\nUnpacking base filesystem..\n\n"
|
||||
echo -e "\nUnpacking base filesystem --- Total: ~2.8G\n\n"
|
||||
rsync -ah --info=progress2 /run/archiso/sfs/airootfs/ $MNT/
|
||||
|
||||
# remove archiso init files and clean up install files
|
||||
@ -75,8 +72,8 @@ setup_configs() {
|
||||
sed -i "s/#en_US.UTF-8/en_US.UTF-8/g; s/#${LOCALE}/${LOCALE}/g" $MNT/etc/locale.gen
|
||||
sed -i "s/en_US.UTF-8/${LOCALE}/g" $MNT/etc/locale.conf
|
||||
cp -f $MNT/etc/locale.conf $MNT/etc/default/locale
|
||||
chroot_cmd "locale-gen" 2>$ERR
|
||||
chroot_cmd "ln -sf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" 2>$ERR
|
||||
chroot_cmd "locale-gen" 2>/dev/null
|
||||
chroot_cmd "ln -sf /usr/share/zoneinfo/$ZONE/$SUBZONE /etc/localtime" 2>/dev/null
|
||||
|
||||
# setup xorg vsync config for intel graphics
|
||||
if [[ $(lspci | grep ' VGA ' | grep 'Intel') != "" ]]; then
|
||||
@ -211,10 +208,6 @@ update_system() {
|
||||
rmpkg="$rmpkg $vbx virtualbox-guest-utils"
|
||||
fi
|
||||
|
||||
if [[ $INSTALL_WMS == 'dwm' ]]; then
|
||||
inpkg="$inpkg xorg-server"
|
||||
fi
|
||||
|
||||
# for gnome and cinnamon we don't need the xfce provided stuff
|
||||
if [[ $INSTALL_WMS == 'gnome' || $INSTALL_WMS == 'cinnamon' ]]; then
|
||||
rmpkg="$(pacman -Qssq 'xfce4*' 2>/dev/null)"
|
||||
@ -233,6 +226,12 @@ update_system() {
|
||||
|
||||
chroot_cmd "$update; $network; $install; $remove"
|
||||
|
||||
if [[ $EXTRA_PACKAGES =~ neovim ]]; then
|
||||
mkdir -p $MNT/home$LIVE/.config/nvim
|
||||
cp -f $MNT/home/$LIVE/.vimrc $MNT/home$LIVE/.config/nvim/init.vim
|
||||
cp -rf $MNT/home/$LIVE/.vim/colors $MNT/home$LIVE/.config/nvim/colors
|
||||
fi
|
||||
|
||||
if [[ $INSTALL_WMS =~ dwm ]]; then
|
||||
mkdir -pv $MNT/home/$LIVE/suckless
|
||||
for prog in dwm st dmenu; do
|
||||
|
Reference in New Issue
Block a user