minor adjustment

This commit is contained in:
JaKooLit 2025-02-04 22:53:35 +09:00
parent 2656e277ba
commit 50343fe1c6
2 changed files with 6 additions and 1 deletions

View File

@ -49,6 +49,9 @@ show_progress() {
# Function for installing packages with a progress bar # Function for installing packages with a progress bar
install_package() { install_package() {
if sudo dpkg -l | grep -q -w "$1" ; then
echo -e "${INFO} ${MAGENTA}$1${RESET} is already installed. Skipping..."
else
( (
stdbuf -oL sudo apt-get install -y "$1" 2>&1 stdbuf -oL sudo apt-get install -y "$1" 2>&1
) >> "$LOG" 2>&1 & ) >> "$LOG" 2>&1 &

View File

@ -72,7 +72,9 @@ fi
read -p "${CAT} Have you edited your /etc/apt/sources.list? ${YELLOW}[Very Important else script will fail]${RESET} (y/n): ${RESET}" proceed2 read -p "${CAT} Have you edited your /etc/apt/sources.list? ${YELLOW}[Very Important else script will fail]${RESET} (y/n): ${RESET}" proceed2
if [ "$proceed2" != "y" ]; then if [ "$proceed2" != "y" ]; then
printf "\n%.0s" {1..2}
echo "Installation aborted! Kindly edit your ${YELLOW}sources.list${RESET} first. Refer to readme." echo "Installation aborted! Kindly edit your ${YELLOW}sources.list${RESET} first. Refer to readme."
printf "\n%.0s" {1..2}
exit 1 exit 1
fi fi