diff --git a/install.sh b/install.sh index 0a6eaf6a9..44f224c0a 100755 --- a/install.sh +++ b/install.sh @@ -87,7 +87,7 @@ if ! command -v apt &> /dev/null; then fancy_message error "apt could not be found" exit 1 fi -apt-get install -y -qq sudo wget curl iputils-ping +apt-get install -y -qq sudo wget curl iputils-ping aptitude echo -e "${PACYELLOW}┌────────────────────────┐\n│ ${PACCYAN}Pacstall Installer${PACYELLOW} │\n└────────────────────────┘${NC}" diff --git a/misc/scripts/update.sh b/misc/scripts/update.sh index 3a029bb38..0a0deca93 100755 --- a/misc/scripts/update.sh +++ b/misc/scripts/update.sh @@ -29,6 +29,8 @@ export NC='\033[0m' export UCyan='\033[4;36m' export BPurple='\033[1;35m' +required_packages=(lsb-release aptitude) + function suggested_solution() { if [[ -z $PACSTALL_SUPPRESS_SOLUTIONS ]]; then local inputs=("${@}") @@ -53,8 +55,13 @@ sudo chown "$PACSTALL_USER" -R /tmp/pacstall sudo mkdir -p /usr/share/bash-completion/completions -if ! dpkg -s lsb-release > /dev/null 2>&1; then - sudo apt-get install lsb-release -y +for pkg in "${required_packages[@]}"; do + if ! dpkg -s "${pkg}" > /dev/null 2>&1; then + to_install+=("${pkg}") + fi +done +if ((${#to_install[@]} != 0)); then + sudo apt-get install "${to_install[@]}" -y fi # Pre 4.0.0 metadata dir changes