Fix small issues
This commit is contained in:
parent
7279cfb91a
commit
d28bfa7efc
28
install.sh
28
install.sh
@ -93,6 +93,7 @@ print_phase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
download_fzf() {
|
download_fzf() {
|
||||||
|
[ -f /usr/bin/fzf ] && return 0
|
||||||
echo -n "Downloading fzf (for script use only)..."
|
echo -n "Downloading fzf (for script use only)..."
|
||||||
curl -sL "$FZF_DOWNLOAD" -o fzf.tar.gz
|
curl -sL "$FZF_DOWNLOAD" -o fzf.tar.gz
|
||||||
tar -xf fzf.tar.gz
|
tar -xf fzf.tar.gz
|
||||||
@ -102,6 +103,7 @@ download_fzf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
download_parted() {
|
download_parted() {
|
||||||
|
[ -f /usr/bin/parted ] && return 0
|
||||||
echo -n "Downloading parted (for script use only)..."
|
echo -n "Downloading parted (for script use only)..."
|
||||||
curl -sL "$PARTED_DOWNLOAD" -o parted.tar.zst
|
curl -sL "$PARTED_DOWNLOAD" -o parted.tar.zst
|
||||||
tar -xf parted.tar.zst
|
tar -xf parted.tar.zst
|
||||||
@ -146,6 +148,9 @@ prompt_drive() {
|
|||||||
|
|
||||||
partition() {
|
partition() {
|
||||||
print_phase "Disk partitioning"
|
print_phase "Disk partitioning"
|
||||||
|
set +e
|
||||||
|
ultra_quiet swapoff -a
|
||||||
|
set -e
|
||||||
[ -f /bin/parted ] || download_parted
|
[ -f /bin/parted ] || download_parted
|
||||||
|
|
||||||
local rootN
|
local rootN
|
||||||
@ -222,7 +227,7 @@ set_timezone() {
|
|||||||
set_locale() {
|
set_locale() {
|
||||||
echo -n "Configuring locale..."
|
echo -n "Configuring locale..."
|
||||||
sed "s/^#$LOCALE/$LOCALE/" < /mnt/etc/locale.gen > /etc/locale.gen
|
sed "s/^#$LOCALE/$LOCALE/" < /mnt/etc/locale.gen > /etc/locale.gen
|
||||||
locale-gen
|
quiet locale-gen
|
||||||
cp -f /usr/lib/locale/locale-archive /mnt/usr/lib/locale/locale-archive
|
cp -f /usr/lib/locale/locale-archive /mnt/usr/lib/locale/locale-archive
|
||||||
|
|
||||||
echo "export LANG=\"en_US.UTF-8\"" > /mnt/etc/locale.conf
|
echo "export LANG=\"en_US.UTF-8\"" > /mnt/etc/locale.conf
|
||||||
@ -230,15 +235,16 @@ set_locale() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
echo -n "Setting keyboard layout..."
|
echo -n "Setting keyboard layout..."
|
||||||
echo "KEYMAP=\"$KBD_LAYOUT\"" > /etc/vconsole.conf
|
echo "KEYMAP=\"$KBD_LAYOUT\"" > /mnt/etc/vconsole.conf
|
||||||
|
|
||||||
XKBD="$(awk -F: '$1 ~ /^'$KBD_LAYOUT'$/ {print $0; exit 0}' keyboard-map.csv)"
|
XKBD="$(awk -F, '$1 ~ /^'$KBD_LAYOUT'$/ {print $0; exit 0}' keyboard-map.csv)"
|
||||||
XKBD_LAYOUT="$(echo $XKBD | awk -F: '{print $2}')"
|
XKBD_LAYOUT="$(echo $XKBD | awk -F, '{print $2}')"
|
||||||
XKBD_MODEL="$(echo $XKBD | awk -F: '{print $3}')"
|
XKBD_MODEL="$(echo $XKBD | awk -F, '{print $3}')"
|
||||||
XKBD_VARIANT="$(echo $XKBD | awk -F: '{print $4}')"
|
XKBD_VARIANT="$(echo $XKBD | awk -F, '{print $4}')"
|
||||||
XKBD_OPTIONS="$(echo $XKBD | awk -F: '{print $5}')"
|
XKBD_OPTIONS="$(echo $XKBD | awk -F, '{print $5}')"
|
||||||
echo "keymap=\"$XKBD_LAYOUT\"" > /etc/conf.d/keymaps
|
echo "keymap=\"$XKBD_LAYOUT\"" > /mnt/etc/conf.d/keymaps
|
||||||
local XKBD_CONF="/etc/X11/xorg.conf.d/00-keyboard.conf"
|
local XKBD_CONF="/mnt/etc/X11/xorg.conf.d/00-keyboard.conf"
|
||||||
|
mkdir -p $(dirname $XKBD_CONF)
|
||||||
echo "Section \"InputClass\"" > $XKBD_CONF
|
echo "Section \"InputClass\"" > $XKBD_CONF
|
||||||
echo " Identifier \"system-keyboard\"" >> $XKBD_CONF
|
echo " Identifier \"system-keyboard\"" >> $XKBD_CONF
|
||||||
echo " MatchIsKeyboard \"on\"" >> $XKBD_CONF
|
echo " MatchIsKeyboard \"on\"" >> $XKBD_CONF
|
||||||
@ -328,7 +334,7 @@ prompt_all() {
|
|||||||
|
|
||||||
[ -f keyboard-map.csv ] || curl -sL "$KEYBOARD_MAP" -o keyboard-map.csv
|
[ -f keyboard-map.csv ] || curl -sL "$KEYBOARD_MAP" -o keyboard-map.csv
|
||||||
echo "Choose keyboard layout:"
|
echo "Choose keyboard layout:"
|
||||||
KBD_LAYOUT="$(awk -F: '{print $1}' keyboard-map.csv | fzf --layout=reverse --height=20)"
|
KBD_LAYOUT="$(awk -F, '{print $1}' keyboard-map.csv | fzf --layout=reverse --height=20)"
|
||||||
|
|
||||||
ask_password root
|
ask_password root
|
||||||
ROOT_PASSWORD="$USER_PASSWORD"
|
ROOT_PASSWORD="$USER_PASSWORD"
|
||||||
@ -346,8 +352,6 @@ post_install() {
|
|||||||
curl -sL "$POST_INSTALL_SCRIPT" -o post-install.sh
|
curl -sL "$POST_INSTALL_SCRIPT" -o post-install.sh
|
||||||
mv post-install.sh /mnt/root
|
mv post-install.sh /mnt/root
|
||||||
chmod +x /mnt/root/post-install.sh
|
chmod +x /mnt/root/post-install.sh
|
||||||
echo -n "Ready for post-install script. Press any key to continue..."
|
|
||||||
read dummy
|
|
||||||
print_phase "Post installation"
|
print_phase "Post installation"
|
||||||
right_chroot /mnt /root/post-install.sh -nu "$PERSONAL_USER"
|
right_chroot /mnt /root/post-install.sh -nu "$PERSONAL_USER"
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ if [ $NO_CONFIRM -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### INSTALLATION ###
|
### INSTALLATION ###
|
||||||
[ $VERBOSE ] && set -x
|
[ $VERBOSE -eq 1 ] && set -x
|
||||||
|
|
||||||
print_phase() {
|
print_phase() {
|
||||||
echo -e "${BOLD}${YELLOW}[$CUR_PHASE/$MAX_PHASE] $1 phase${NC}${NORM}"
|
echo -e "${BOLD}${YELLOW}[$CUR_PHASE/$MAX_PHASE] $1 phase${NC}${NORM}"
|
||||||
@ -186,7 +186,7 @@ install_aur() {
|
|||||||
qpushd "$1"
|
qpushd "$1"
|
||||||
|
|
||||||
#dependencies
|
#dependencies
|
||||||
for pkg in $(sudo -u nobody makepkg --printsrcinfo | awk '$1 ~ /^makedepends$/ {print $3}'); do
|
for pkg in $(sudo -u nobody makepkg --printsrcinfo | awk '$1 ~ /depends/ {print $3}'); do
|
||||||
install $pkg
|
install $pkg
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user