install.sh: check requirements

This commit is contained in:
Jesus 2024-05-27 01:11:45 +08:00
parent ae50a05447
commit 271ec19608
Signed by: heckyel
GPG Key ID: 531E723EED721D7C

View File

@ -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() {