You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
847 B
43 lines
847 B
#!/bin/sh
|
|
|
|
set -uo pipefail
|
|
|
|
if (( $EUID != 0 )); then
|
|
echo "Should be run as root"
|
|
exit 1
|
|
fi
|
|
|
|
# Enable wget?
|
|
read -p ":: Enable wget? [Y/n] " enablewget
|
|
enablewget=${enablewget:-Y}
|
|
|
|
if [[ $enablewget =~ [yY] ]]; then
|
|
echo ":: Checking if wget is installed"
|
|
pacman -Q wget &> /dev/null
|
|
if [ $? = 1 ]; then
|
|
echo ":: Installing wget"
|
|
pacman -Syu wget
|
|
else
|
|
echo ":: Success: wget is installed"
|
|
fi
|
|
|
|
echo "Enabling wget"
|
|
sed -i '/XferCommand \= \/usr\/bin\/wget/s/^#//g' /etc/pacman.conf
|
|
fi
|
|
|
|
# Enable multilib?
|
|
read -p ":: Enable multilib? [Y/n] " enablemultilib
|
|
enablemultilib=${enablemultilib:-Y}
|
|
|
|
if [[ $enablemultilib =~ [yY] ]]; then
|
|
echo "Enabling multilib"
|
|
|
|
if ! grep -q "^\[multilib\]" /etc/pacman.conf; then
|
|
cat >> /etc/pacman.conf <<EOF
|
|
|
|
[multilib]
|
|
Include = /etc/pacman.d/mirrorlist
|
|
EOF
|
|
fi
|
|
fi
|