Fix post-installation issues
This commit is contained in:
parent
b9bacbe17f
commit
0fa66a2251
10
install.sh
10
install.sh
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
qpushd() {
|
qpushd() {
|
||||||
@ -217,9 +217,9 @@ set_timezone() {
|
|||||||
|
|
||||||
set_locale() {
|
set_locale() {
|
||||||
echo -n "Configuring locale..."
|
echo -n "Configuring locale..."
|
||||||
cat /mnt/etc/locale.gen | sed "s/^#$LOCALE/$LOCALE/" > /tmp/locale.gen
|
sed "s/^#$LOCALE/$LOCALE/" < /mnt/etc/locale.gen > /etc/locale.gen
|
||||||
mv /tmp/locale.gen /mnt/etc/locale.gen
|
locale-gen
|
||||||
quiet right_chroot /mnt locale-gen
|
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
|
||||||
echo "export LC_COLLATE=\"C\"" >> /mnt/etc/locale.conf
|
echo "export LC_COLLATE=\"C\"" >> /mnt/etc/locale.conf
|
||||||
@ -300,7 +300,7 @@ prompt_all() {
|
|||||||
qpopd
|
qpopd
|
||||||
|
|
||||||
echo "Choose locale:"
|
echo "Choose locale:"
|
||||||
LOCALE=$(cat /etc/locale.gen | sed '/^#\s/D' | sed '/^#$/D' | sed 's/^#//' | fzf --layout=reverse --height=20)
|
LOCALE=$(sed '/^#\s/D' < /etc/locale.gen | sed '/^#$/D' | sed 's/^#//' | fzf --layout=reverse --height=20)
|
||||||
|
|
||||||
ask_password root
|
ask_password root
|
||||||
ROOT_PASSWORD="$USER_PASSWORD"
|
ROOT_PASSWORD="$USER_PASSWORD"
|
||||||
|
@ -4,7 +4,6 @@ PAC,cmake,Meta-build system
|
|||||||
PAC,cmus,Terminal music player
|
PAC,cmus,Terminal music player
|
||||||
AUR,compiledb,Utility for generating compile_commands.json from Makefile
|
AUR,compiledb,Utility for generating compile_commands.json from Makefile
|
||||||
FUN,install_dash,
|
FUN,install_dash,
|
||||||
FUN,install_doas,
|
|
||||||
PAC,dunst,Notification daemon
|
PAC,dunst,Notification daemon
|
||||||
SRC,https://github.com/augustogunsch/dmenu,Graphical dynamic menu
|
SRC,https://github.com/augustogunsch/dmenu,Graphical dynamic menu
|
||||||
SRC,https://github.com/augustogunsch/dwm,Tiling window manager
|
SRC,https://github.com/augustogunsch/dwm,Tiling window manager
|
||||||
@ -13,7 +12,6 @@ PAC,feh,Image viewer
|
|||||||
PAC,firejail,Sandbox program
|
PAC,firejail,Sandbox program
|
||||||
PAC,fzf,Fuzzy finder
|
PAC,fzf,Fuzzy finder
|
||||||
PAC,gcc,C compiler
|
PAC,gcc,C compiler
|
||||||
PAC,git,Version control system
|
|
||||||
PAC,go,Go compiler
|
PAC,go,Go compiler
|
||||||
PAC,gvim,Text editor
|
PAC,gvim,Text editor
|
||||||
PAC,libnotify,Implementation of the Desktop Notifications Specification
|
PAC,libnotify,Implementation of the Desktop Notifications Specification
|
||||||
@ -22,6 +20,7 @@ PAC,lxsession,Graphical authentication agent
|
|||||||
PAC,man,Interface to system manuals
|
PAC,man,Interface to system manuals
|
||||||
PAC,mpv,Media player
|
PAC,mpv,Media player
|
||||||
PAC,mupdf,Lightweight PDF viewer
|
PAC,mupdf,Lightweight PDF viewer
|
||||||
|
PAC,opendoas,Sudo alternative
|
||||||
PAC,openssh,Secure shell
|
PAC,openssh,Secure shell
|
||||||
PAC,picom,X11 compositor
|
PAC,picom,X11 compositor
|
||||||
PAC,polkit,Toolkit for handling the policy that allows unprivileged processes to speak to privileged ones
|
PAC,polkit,Toolkit for handling the policy that allows unprivileged processes to speak to privileged ones
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
qpushd() {
|
qpushd() {
|
||||||
@ -169,10 +169,9 @@ print_phase() {
|
|||||||
install_aur() {
|
install_aur() {
|
||||||
[ -z "$INSTALL_USER" ] && return 0
|
[ -z "$INSTALL_USER" ] && return 0
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo -n "Installing $1 from AUR..."
|
echo -n "Installing ${LGREEN}$1${NC} from AUR..."
|
||||||
else
|
else
|
||||||
echo "Installing $1 from AUR. Description:"
|
echo -n "Installing ${LGREEN}$1${NC} from AUR ($2)..."
|
||||||
echo "$2"
|
|
||||||
fi
|
fi
|
||||||
local dir="$HOME_DIR/$1"
|
local dir="$HOME_DIR/$1"
|
||||||
quiet sudo -u "$INSTALL_USER" git clone -q "https://aur.archlinux.org/$1.git" "$dir"
|
quiet sudo -u "$INSTALL_USER" git clone -q "https://aur.archlinux.org/$1.git" "$dir"
|
||||||
@ -401,7 +400,10 @@ append_line() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configure_doas() {
|
configure_doas() {
|
||||||
[ -f /bin/doas ] || return 0
|
remove sudo
|
||||||
|
pacman_opt IgnorePkg sudo
|
||||||
|
pacman_opt NoUpgrade bin/sudo
|
||||||
|
link /bin/doas /bin/sudo
|
||||||
echo "Configuring doas..."
|
echo "Configuring doas..."
|
||||||
prompt_user 'doas will be configured'
|
prompt_user 'doas will be configured'
|
||||||
local DOAS_USER="$USER_OUT"
|
local DOAS_USER="$USER_OUT"
|
||||||
@ -412,14 +414,6 @@ configure_doas() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_doas() {
|
|
||||||
remove sudo
|
|
||||||
install opendoas "Sudo alternative"
|
|
||||||
pacman_opt IgnorePkg sudo
|
|
||||||
pacman_opt NoUpgrade bin/sudo
|
|
||||||
link /bin/doas /bin/sudo
|
|
||||||
}
|
|
||||||
|
|
||||||
install_dash() {
|
install_dash() {
|
||||||
install dash "Lightweight POSIX shell"
|
install dash "Lightweight POSIX shell"
|
||||||
pacman_opt NoUpgrade bin/sh
|
pacman_opt NoUpgrade bin/sh
|
||||||
@ -443,6 +437,7 @@ repos() {
|
|||||||
quiet pacman -Sy
|
quiet pacman -Sy
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
|
install archlinux-keyring
|
||||||
echo -n "Configuring pacman keyring..."
|
echo -n "Configuring pacman keyring..."
|
||||||
quiet pacman-key --init
|
quiet pacman-key --init
|
||||||
quiet pacman-key --populate archlinux
|
quiet pacman-key --populate archlinux
|
||||||
@ -498,10 +493,9 @@ install_src() {
|
|||||||
qpushd "$HOME"
|
qpushd "$HOME"
|
||||||
local PKG_NAME="$(basename "$1")"
|
local PKG_NAME="$(basename "$1")"
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo -n "Installing $PKG_NAME from source..."
|
echo -n "Installing ${LGREEN}$PKG_NAME${NC} from source..."
|
||||||
else
|
else
|
||||||
echo "Installing $PKG_NAME from source. Description:"
|
echo -n "Installing ${LGREEN}$PKG_NAME${NC} from source ($2)..."
|
||||||
echo "$2"
|
|
||||||
fi
|
fi
|
||||||
quiet git clone -q "$1"
|
quiet git clone -q "$1"
|
||||||
qpushd "$PKG_NAME"
|
qpushd "$PKG_NAME"
|
||||||
@ -509,6 +503,7 @@ install_src() {
|
|||||||
make install
|
make install
|
||||||
qpopd
|
qpopd
|
||||||
qpopd
|
qpopd
|
||||||
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_loop() {
|
install_loop() {
|
||||||
@ -532,8 +527,8 @@ install_packages() {
|
|||||||
quiet pacman -Sqyu --noconfirm
|
quiet pacman -Sqyu --noconfirm
|
||||||
echo "done"
|
echo "done"
|
||||||
|
|
||||||
install_doas
|
install sudo
|
||||||
install_dash
|
install git "Version control system"
|
||||||
|
|
||||||
install_loop
|
install_loop
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user