From 3826f0916b2405d797ac792fb1e3e7a8e3d5d315 Mon Sep 17 00:00:00 2001 From: developomp Date: Sat, 9 Oct 2021 16:23:58 +0900 Subject: [PATCH] check if it's installed aleady before installing essential packages --- setup.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 925f4bc..f011980 100755 --- a/setup.sh +++ b/setup.sh @@ -77,10 +77,16 @@ install_paru() { setup_essentials() { # install paru if it does not exist if ! command -v paru &> /dev/null; then + log "paru was not installed already. Installing now..." install_paru fi - package_install dialog &> /dev/null + # install dialog if it's not installed already + if ! command -v dialog &> /dev/null; then + log "dialog was not installed already. Installing now..." + package_install dialog + fi + # enable multilib, color, parallel download, and total download in /etc/pacman.conf } @@ -639,6 +645,7 @@ fi # #################### [ START ] #################### +# move to script directory (repo root) cd "$SCRIPT_DIR" || { error "FAILED TO FIND SCRIPT DIRECTORY" exit @@ -656,8 +663,6 @@ if [[ $REPLY =~ ^[^Yy]$ ]]; then exit fi -echo - # #################### [ MAIN ] ####################