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
case ${PACKAGER} in
pacman)
sudo ${PACKAGER} -S --noconfirm alacritty
sudo ${PACKAGER} -S --needed --noconfirm alacritty
;;
*)
sudo ${PACKAGER} install -y alacritty

View File

@ -13,7 +13,7 @@ setupDWM() {
echo "Installing DWM-Titus if not already installed"
case "$PACKAGER" in # Install pre-Requisites
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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,13 +33,13 @@ installDepend() {
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
echo "[multilib]" | 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
echo "Multilib is already enabled."
fi
if ! command_exists yay && ! command_exists paru; then
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 yay-git && makepkg --noconfirm -si
else
@ -53,7 +53,7 @@ installDepend() {
echo "No AUR helper found. Please install yay or paru."
exit 1
fi
"$AUR_HELPER" --noconfirm -S "$DEPENDENCIES"
"$AUR_HELPER" -S --needed --noconfirm "$DEPENDENCIES"
;;
apt-get|nala)
COMPILEDEPS='build-essential'

View File

@ -9,13 +9,13 @@ installDepend() {
if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then
echo "[multilib]" | 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
echo "Multilib is already enabled."
fi
if ! command_exists yay && ! command_exists paru; then
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 yay-git && makepkg --noconfirm -si
else
@ -29,7 +29,7 @@ installDepend() {
echo "No AUR helper found. Please install yay or paru."
exit 1
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 \
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 \

View File

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

View File

@ -7,7 +7,7 @@ installDepend() {
pacman)
if ! command_exists paru; then
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 paru && makepkg --noconfirm -si
echo "Paru installed"

View File

@ -7,7 +7,7 @@ installDepend() {
pacman)
if ! command_exists yay; then
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 yay-git && makepkg --noconfirm -si
echo "Yay installed"

View File

@ -7,7 +7,7 @@ fastUpdate() {
pacman)
if ! command_exists yay && ! command_exists paru; then
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 yay-git && makepkg --noconfirm -si || { echo -e "${RED}Failed to install yay${RC}"; exit 1; }
else
@ -21,7 +21,7 @@ fastUpdate() {
echo "No AUR helper found. Please install yay or paru."
exit 1
fi
${AUR_HELPER} --noconfirm -S rate-mirrors-bin
${AUR_HELPER} -S --needed --noconfirm rate-mirrors-bin
if [ -s /etc/pacman.d/mirrorlist ]; then
sudo cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
fi