mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-24 12:29:44 +00:00
fix partial upgrades and reinstallation of packages in Arch Linux
This commit is contained in:
parent
4c38069b83
commit
b1b4190e49
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user