ok. This should be the final push.... F.. hard to tweak... lmao
This commit is contained in:
@@ -19,40 +19,4 @@ for PKG1 in "${base[@]}"; do
|
|||||||
install_package_pacman "$PKG1" | tee -a "$LOG"
|
install_package_pacman "$PKG1" | tee -a "$LOG"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "${NOTE} Adding Extra Spice in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
pacman_conf="/etc/pacman.conf"
|
|
||||||
|
|
||||||
# Remove comments '#' from specific lines
|
|
||||||
lines_to_edit=(
|
|
||||||
"color"
|
|
||||||
"CheckSpace"
|
|
||||||
"VerbosePkgLists"
|
|
||||||
"ParallelDownloads"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Uncomment specified lines if they are commented out
|
|
||||||
for line in "${lines_to_edit[@]}"; do
|
|
||||||
if grep -q "^#$line" "$pacman_conf"; then
|
|
||||||
sudo sed -i "s/^#$line/$line/" "$pacman_conf"
|
|
||||||
echo -e "${CAT} Uncommented: $line ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
else
|
|
||||||
echo -e "${CAT} $line is already uncommented. ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
|
||||||
if grep -q "^#ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
|
||||||
sudo sed -i "/^#ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
|
||||||
echo -e "${CAT} Added ILoveCandy below ParallelDownloads. ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
else
|
|
||||||
echo -e "${CAT} ILoveCandy already exists ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "${CAT} Pacman.conf spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
|
|
||||||
# updating pacman.conf
|
|
||||||
sudo pacman -Sy
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
45
install-scripts/pacman.sh
Executable file
45
install-scripts/pacman.sh
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 💫 https://github.com/JaKooLit 💫 #
|
||||||
|
# pacman adding up extra-spices #
|
||||||
|
|
||||||
|
## WARNING: DO NOT EDIT BEYOND THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING! ##
|
||||||
|
source "$(dirname "$(readlink -f "$0")")/Global_functions.sh"
|
||||||
|
|
||||||
|
# Set the name of the log file to include the current date and time
|
||||||
|
LOG="Install-Logs/install-$(date +%d-%H%M%S)_pacman.log"
|
||||||
|
|
||||||
|
echo -e "${NOTE} Adding Extra Spice in pacman.conf ... ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
pacman_conf="/etc/pacman.conf"
|
||||||
|
|
||||||
|
# Remove comments '#' from specific lines
|
||||||
|
lines_to_edit=(
|
||||||
|
"Color"
|
||||||
|
"CheckSpace"
|
||||||
|
"VerbosePkgLists"
|
||||||
|
"ParallelDownloads"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Uncomment specified lines if they are commented out
|
||||||
|
for line in "${lines_to_edit[@]}"; do
|
||||||
|
if grep -q "^#$line" "$pacman_conf"; then
|
||||||
|
sudo sed -i "s/^#$line/$line/" "$pacman_conf"
|
||||||
|
echo -e "${CAT} Uncommented: $line ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo -e "${CAT} $line is already uncommented. ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Add "ILoveCandy" below ParallelDownloads if it doesn't exist
|
||||||
|
if grep -q "^ParallelDownloads" "$pacman_conf" && ! grep -q "^ILoveCandy" "$pacman_conf"; then
|
||||||
|
sudo sed -i "/^ParallelDownloads/a ILoveCandy" "$pacman_conf"
|
||||||
|
echo -e "${CAT} Added ILoveCandy below ParallelDownloads. ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo -e "${CAT} ILoveCandy already exists ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${CAT} Pacman.conf spicing up completed ${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
|
||||||
|
# updating pacman.conf
|
||||||
|
sudo pacman -Sy
|
||||||
|
|
||||||
|
clear
|
||||||
@@ -141,11 +141,11 @@ printf "\n"
|
|||||||
|
|
||||||
# Ensuring all in the scripts folder are made executable
|
# Ensuring all in the scripts folder are made executable
|
||||||
chmod +x install-scripts/*
|
chmod +x install-scripts/*
|
||||||
|
sleep 0.5
|
||||||
sleep 1
|
|
||||||
# Ensuring base-devel is installed
|
# Ensuring base-devel is installed
|
||||||
execute_script "00-base.sh"
|
execute_script "00-base.sh"
|
||||||
|
sleep 0.5
|
||||||
|
execute_script "pacman.sh"
|
||||||
# Execute AUR helper script based on user choice
|
# Execute AUR helper script based on user choice
|
||||||
if [ "$aur_helper" == "paru" ]; then
|
if [ "$aur_helper" == "paru" ]; then
|
||||||
execute_script "paru.sh"
|
execute_script "paru.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user