This commit is contained in:
Stephan Raabe 2024-05-24 14:57:18 +02:00
parent 932ce5aa6e
commit 565d99a103
4 changed files with 19 additions and 2 deletions

View File

@ -2,6 +2,7 @@
# ------------------------------------------------------
# Activate parallel downloads
# ------------------------------------------------------
# Search for the line containing "ParallelDownloads = 5"
line=$(grep "ParallelDownloads = 5" /etc/pacman.conf)
@ -10,7 +11,7 @@ if [[ $line == \#* ]]; then
echo -e "${GREEN}"
figlet "Downloads"
echo -e "${NONE}"
echo ":: You can activate 5 parallel downloads in pacman.conf to speedup the download of the packages?"
echo ":: You can activate parallel downloads in pacman.conf to speedup the download of packages?"
if gum confirm "Do you want to activate parallel downloads?"; then
# Remove the '#' character from the beginning of the line
@ -37,4 +38,18 @@ else
echo ":: Parallel downloads could not be activated. Required configuration in /etc/pacman.conf could not found."
fi
fi
# Activate Color in pacman.conf
if grep -Fxq "#Color" /etc/pacman.conf
then
sudo sed -i 's/^#Color/Color/' /etc/pacman.conf
echo ":: Color activated in pacman.conf"
else
echo ":: Color is already activated in pacman.conf"
fi
if grep -Fxq "# Color" /etc/pacman.conf
then
sudo sed -i 's/^# Color/Color/' /etc/pacman.conf
echo ":: Color activated in pacman.conf"
fi
echo

Binary file not shown.

View File

@ -1,6 +1,5 @@
#!/bin/bash
clear
cat <<"EOF"
____ _ _ _ ____ __ __
| _ \(_)___ __ _| |__ | | ___| _ \| \/ |

View File

@ -6,6 +6,8 @@
# |_| \__,_|\___|_| |_| |_|\__,_|_| |_|
#
sleep 1
clear
figlet "pacman.conf"
echo
echo ":: This script will activate or deactivate additions for your pacman.conf."
@ -53,3 +55,4 @@ else
echo ":: Activation of ILoveCandy skipped."
fi
fi
sleep 2