From 95ccc39a93e261ee9c60a6fd57a9af41179d65ed Mon Sep 17 00:00:00 2001 From: Ian Mancini Date: Sun, 12 Apr 2020 04:59:05 -0300 Subject: [PATCH] Install dialog if not found in install_packages --- setup/install_packages | 11 ++++++++++- setup/packages/core | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/setup/install_packages b/setup/install_packages index 55f5deb..fd207ba 100755 --- a/setup/install_packages +++ b/setup/install_packages @@ -1,6 +1,6 @@ #!/bin/sh -set -Eeuo pipefail +set -uo pipefail if (( $EUID != 0 )); then echo "Should be run as root" @@ -15,6 +15,15 @@ if [[ $setuppacman =~ [yY] ]]; then source "./setup_pacman" fi +echo ":: Checking if dialog is installed" +pacman -Q dialog &> /dev/null +if [ $? = 1 ]; then + echo ":: Installing dialog" + pacman -Syu dialog +else + echo ":: Success: dialog is installed" +fi + DEFAULT_STATE="on" files="" diff --git a/setup/packages/core b/setup/packages/core index 96f097a..fd24036 100644 --- a/setup/packages/core +++ b/setup/packages/core @@ -1 +1 @@ -base base-devel linux linux-firmware +base base-devel linux linux-firmware dialog