From fe56d1e2f4f34a2f76885f242c2f2a864273a155 Mon Sep 17 00:00:00 2001 From: jomo Date: Thu, 13 Aug 2015 00:22:13 +0200 Subject: [PATCH] check requirements before trying to setup --- setup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.sh b/setup.sh index 3232ec7..3748cca 100755 --- a/setup.sh +++ b/setup.sh @@ -3,6 +3,15 @@ # exit on failure set -e +for cmd in curl java unzip git pip; do + if ! which -s "$cmd"; then + tput setf 4 >&2 + echo "Error: please install '$cmd' to proceed" >&2 + tput sgr0 >&2 + exit 1 + fi +done + echo -e "> This will only set up Spigot and all the plugins, configuration files are still up to you to manage" echo -e "> Press enter to coninue" read