Minor cleanup
This commit is contained in:
parent
2b949499ba
commit
9dea6c7dd9
@ -1500,7 +1500,17 @@ install_user()
|
|||||||
chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2>$ERR
|
chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2>$ERR
|
||||||
errshow 1 "set $NEWUSER password"
|
errshow 1 "set $NEWUSER password"
|
||||||
|
|
||||||
[[ $INSTALL_WMS == *dwm* ]] && install_suckless
|
if [[ $INSTALL_WMS == *dwm* ]];then
|
||||||
|
mkdir -pv "$mnt/home/$newuser/suckless"
|
||||||
|
for i in dwm dmenu st; do
|
||||||
|
if chrun "git clone https://git.suckless.org/$i /home/$newuser/suckless/$i"; then
|
||||||
|
chrun "cd /home/$newuser/suckless/$i; make prefix=/usr install; make clean; rm config.h"
|
||||||
|
else
|
||||||
|
printf "failed to clone %s repo\n" "$i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
[[ $WM_PKGS == *xfce* ]] && echo 'volumeicon &' >> $MNT/home/$NEWUSER/.xprofile
|
[[ $WM_PKGS == *xfce* ]] && echo 'volumeicon &' >> $MNT/home/$NEWUSER/.xprofile
|
||||||
|
|
||||||
# remove some commands from ~/.xprofile when using KDE or Gnome as the login session
|
# remove some commands from ~/.xprofile when using KDE or Gnome as the login session
|
||||||
@ -1613,19 +1623,6 @@ install_packages()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
install_suckless()
|
|
||||||
{
|
|
||||||
mkdir -pv "$MNT/home/$NEWUSER/suckless"
|
|
||||||
|
|
||||||
for i in dwm dmenu st; do
|
|
||||||
if chrun "git clone https://git.suckless.org/$i /home/$NEWUSER/suckless/$i"; then
|
|
||||||
chrun "cd /home/$NEWUSER/suckless/$i; make PREFIX=/usr install; make clean; rm config.h"
|
|
||||||
else
|
|
||||||
printf "failed to clone %s repo\n" "$i"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
install_mkinitcpio()
|
install_mkinitcpio()
|
||||||
{
|
{
|
||||||
local add=''
|
local add=''
|
||||||
@ -1638,10 +1635,8 @@ install_mkinitcpio()
|
|||||||
|
|
||||||
install_mirrorlist()
|
install_mirrorlist()
|
||||||
{
|
{
|
||||||
local mfile="$1" # output mirrorlist file
|
|
||||||
|
|
||||||
if hash reflector >/dev/null 2>&1; then
|
if hash reflector >/dev/null 2>&1; then
|
||||||
reflector --verbose --score 80 -l 40 -f 5 --sort rate --save "$mfile"
|
reflector --verbose --score 80 -l 40 -f 5 --sort rate --save "$1"
|
||||||
elif hash rankmirrors >/dev/null 2>&1; then
|
elif hash rankmirrors >/dev/null 2>&1; then
|
||||||
echo "Sorting mirrorlist"
|
echo "Sorting mirrorlist"
|
||||||
local key="access_key=5f29642060ab983b31fdf4c2935d8c56"
|
local key="access_key=5f29642060ab983b31fdf4c2935d8c56"
|
||||||
@ -1660,7 +1655,7 @@ install_mirrorlist()
|
|||||||
else # no country code so just grab all mirrors, will be a very slow sort but we don't have other options
|
else # no country code so just grab all mirrors, will be a very slow sort but we don't have other options
|
||||||
mirror="https://www.archlinux.org/mirrorlist/?country=all&use_mirror_status=on"
|
mirror="https://www.archlinux.org/mirrorlist/?country=all&use_mirror_status=on"
|
||||||
fi
|
fi
|
||||||
curl -fsSL "$mirror" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 6 - >"$mfile"
|
curl -fsSL "$mirror" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 6 - >"$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -1754,9 +1749,10 @@ setup_syslinux()
|
|||||||
prerun_syslinux()
|
prerun_syslinux()
|
||||||
{
|
{
|
||||||
local c="$MNT/boot/syslinux" s="/usr/lib/syslinux/bios" d=".."
|
local c="$MNT/boot/syslinux" s="/usr/lib/syslinux/bios" d=".."
|
||||||
[[ $SYS == 'UEFI' ]] && { c="$MNT/boot/EFI/syslinux"; s="/usr/lib/syslinux/efi64/"; d=''; }
|
[[ $SYS == 'UEFI' ]] && { c="$MNT/boot/EFI/syslinux"; s="/usr/lib/syslinux/efi64"; d=''; }
|
||||||
|
|
||||||
mkdir -pv "$c" && cp -rfv $s/* "$c/"
|
mkdir -pv "$c"
|
||||||
|
cp -rfv "$s/"* "$c/"
|
||||||
cat > "$c/syslinux.cfg" <<- EOF
|
cat > "$c/syslinux.cfg" <<- EOF
|
||||||
UI menu.c32
|
UI menu.c32
|
||||||
PROMPT 0
|
PROMPT 0
|
||||||
|
Reference in New Issue
Block a user