Merge pull request #159 from AdamJedl/main

fix partial upgrades and reinstallation of packages in Arch Linux
This commit is contained in:
Chris Titus 2024-08-16 00:06:34 -05:00 committed by GitHub
commit 659fec2fb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 17 additions and 18 deletions

View File

@ -7,7 +7,7 @@ setupAlacritty() {
if ! command_exists alacritty; then if ! command_exists alacritty; then
case ${PACKAGER} in case ${PACKAGER} in
pacman) pacman)
sudo ${PACKAGER} -S --noconfirm alacritty sudo ${PACKAGER} -S --needed --noconfirm alacritty
;; ;;
*) *)
sudo ${PACKAGER} install -y alacritty sudo ${PACKAGER} install -y alacritty

View File

@ -13,7 +13,7 @@ setupDWM() {
echo "Installing DWM-Titus if not already installed" echo "Installing DWM-Titus if not already installed"
case "$PACKAGER" in # Install pre-Requisites case "$PACKAGER" in # Install pre-Requisites
pacman) pacman)
sudo "$PACKAGER" -S --noconfirm --needed base-devel libx11 libxinerama libxft imlib2 sudo "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2
;; ;;
*) *)
sudo "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev sudo "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev

View File

@ -7,7 +7,7 @@ setupKitty() {
if ! command_exists kitty; then if ! command_exists kitty; then
case ${PACKAGER} in case ${PACKAGER} in
pacman) pacman)
sudo "${PACKAGER}" -S --noconfirm kitty sudo "${PACKAGER}" -S --needed --noconfirm kitty
;; ;;
*) *)
sudo "${PACKAGER}" install -y kitty sudo "${PACKAGER}" install -y kitty

View File

@ -7,7 +7,7 @@ setupRofi() {
if ! command_exists rofi; then if ! command_exists rofi; then
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
sudo "$PACKAGER" -S --noconfirm rofi sudo "$PACKAGER" -S --needed --noconfirm rofi
;; ;;
*) *)
sudo "$PACKAGER" install -y rofi sudo "$PACKAGER" install -y rofi

View File

@ -8,7 +8,7 @@ install_zsh() {
if ! command_exists zsh; then if ! command_exists zsh; then
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
sudo "$PACKAGER" -Sy --noconfirm zsh sudo "$PACKAGER" -S --needed --noconfirm zsh
;; ;;
*) *)
sudo "$PACKAGER" install -y zsh sudo "$PACKAGER" install -y zsh

View File

@ -7,7 +7,7 @@ installPkg() {
if ! command_exists ufw; then if ! command_exists ufw; then
case ${PACKAGER} in case ${PACKAGER} in
pacman) pacman)
sudo "${PACKAGER}" -Sy --noconfirm ufw sudo "${PACKAGER}" -S --needed --noconfirm ufw
;; ;;
*) *)
sudo "${PACKAGER}" install -y ufw sudo "${PACKAGER}" install -y ufw

View File

@ -33,13 +33,13 @@ installDepend() {
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
echo "[multilib]" | sudo tee -a /etc/pacman.conf echo "[multilib]" | sudo tee -a /etc/pacman.conf
echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
sudo "$PACKAGER" -Sy sudo "$PACKAGER" -Syu
else else
echo "Multilib is already enabled." echo "Multilib is already enabled."
fi fi
if ! command_exists yay && ! command_exists paru; then if ! command_exists yay && ! command_exists paru; then
echo "Installing yay as AUR helper..." echo "Installing yay as AUR helper..."
sudo "$PACKAGER" --noconfirm -S base-devel sudo "$PACKAGER" -S --needed --noconfirm base-devel
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R "$USER":"$USER" ./yay-git cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R "$USER":"$USER" ./yay-git
cd yay-git && makepkg --noconfirm -si cd yay-git && makepkg --noconfirm -si
else else
@ -53,7 +53,7 @@ installDepend() {
echo "No AUR helper found. Please install yay or paru." echo "No AUR helper found. Please install yay or paru."
exit 1 exit 1
fi fi
"$AUR_HELPER" --noconfirm -S "$DEPENDENCIES" "$AUR_HELPER" -S --needed --noconfirm "$DEPENDENCIES"
;; ;;
apt-get|nala) apt-get|nala)
COMPILEDEPS='build-essential' COMPILEDEPS='build-essential'

View File

@ -9,13 +9,13 @@ installDepend() {
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
echo "[multilib]" | sudo tee -a /etc/pacman.conf echo "[multilib]" | sudo tee -a /etc/pacman.conf
echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf echo "Include = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf
sudo ${PACKAGER} -Sy sudo ${PACKAGER} -Syu
else else
echo "Multilib is already enabled." echo "Multilib is already enabled."
fi fi
if ! command_exists yay && ! command_exists paru; then if ! command_exists yay && ! command_exists paru; then
echo "Installing yay as AUR helper..." echo "Installing yay as AUR helper..."
sudo ${PACKAGER} --noconfirm -S base-devel sudo ${PACKAGER} -S --needed --noconfirm base-devel
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R ${USER}:${USER} ./yay-git cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R ${USER}:${USER} ./yay-git
cd yay-git && makepkg --noconfirm -si cd yay-git && makepkg --noconfirm -si
else else
@ -29,7 +29,7 @@ installDepend() {
echo "No AUR helper found. Please install yay or paru." echo "No AUR helper found. Please install yay or paru."
exit 1 exit 1
fi fi
${AUR_HELPER} --noconfirm -S wine giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls \ ${AUR_HELPER} -S --needed --noconfirm wine giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls \
mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error \ mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error \
lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo \ lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo \
sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama \ sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama \

View File

@ -29,8 +29,7 @@ install_theme_tools() {
sudo dnf install -y qt6ct kvantum sudo dnf install -y qt6ct kvantum
;; ;;
pacman) pacman)
sudo pacman -Sy sudo pacman -S --needed --noconfirm qt6ct kvantum
sudo pacman --noconfirm -S qt6ct kvantum
;; ;;
*) *)
printf "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n" printf "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n"

View File

@ -7,7 +7,7 @@ installDepend() {
pacman) pacman)
if ! command_exists paru; then if ! command_exists paru; then
echo "Installing paru as AUR helper..." echo "Installing paru as AUR helper..."
sudo "$PACKAGER" --noconfirm -S base-devel sudo "$PACKAGER" -S --needed --noconfirm base-devel
cd /opt && sudo git clone https://aur.archlinux.org/paru.git && sudo chown -R "$USER": ./paru cd /opt && sudo git clone https://aur.archlinux.org/paru.git && sudo chown -R "$USER": ./paru
cd paru && makepkg --noconfirm -si cd paru && makepkg --noconfirm -si
echo "Paru installed" echo "Paru installed"

View File

@ -7,7 +7,7 @@ installDepend() {
pacman) pacman)
if ! command_exists yay; then if ! command_exists yay; then
echo "Installing yay as AUR helper..." echo "Installing yay as AUR helper..."
sudo "$PACKAGER" --noconfirm -S base-devel sudo "$PACKAGER" -S --needed --noconfirm base-devel
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R "$USER": ./yay-git cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R "$USER": ./yay-git
cd yay-git && makepkg --noconfirm -si cd yay-git && makepkg --noconfirm -si
echo "Yay installed" echo "Yay installed"

View File

@ -7,7 +7,7 @@ fastUpdate() {
pacman) pacman)
if ! command_exists yay && ! command_exists paru; then if ! command_exists yay && ! command_exists paru; then
echo "Installing yay as AUR helper..." echo "Installing yay as AUR helper..."
sudo ${PACKAGER} --noconfirm -S base-devel || { echo -e "${RED}Failed to install base-devel${RC}"; exit 1; } sudo ${PACKAGER} -S --needed --noconfirm base-devel || { echo -e "${RED}Failed to install base-devel${RC}"; exit 1; }
cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R ${USER}:${USER} ./yay-git cd /opt && sudo git clone https://aur.archlinux.org/yay-git.git && sudo chown -R ${USER}:${USER} ./yay-git
cd yay-git && makepkg --noconfirm -si || { echo -e "${RED}Failed to install yay${RC}"; exit 1; } cd yay-git && makepkg --noconfirm -si || { echo -e "${RED}Failed to install yay${RC}"; exit 1; }
else else
@ -21,7 +21,7 @@ fastUpdate() {
echo "No AUR helper found. Please install yay or paru." echo "No AUR helper found. Please install yay or paru."
exit 1 exit 1
fi fi
${AUR_HELPER} --noconfirm -S rate-mirrors-bin ${AUR_HELPER} -S --needed --noconfirm rate-mirrors-bin
if [ -s /etc/pacman.d/mirrorlist ]; then if [ -s /etc/pacman.d/mirrorlist ]; then
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
fi fi