From 271ec196085fd05ada3e4c54e1ccecf306af8028 Mon Sep 17 00:00:00 2001 From: Jesus Date: Mon, 27 May 2024 01:11:45 +0800 Subject: install.sh: check requirements --- install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 05f783a..8658b63 100644 --- a/install.sh +++ b/install.sh @@ -27,6 +27,17 @@ function msg_err() { esac } + +# Check Requirements +# ------------------- +programs=("wget" "curl" "git" "less") +for program in "${programs[@]}"; do + if ! command -v "$program" &>/dev/null; then + msg_err "$program no está instalado." \ + "$program is not installed" && exit 1 + fi +done + # Check URL's # ----------- function _which() { -- cgit v1.2.3