From 84712b55bb0cf599e3efa97a38c036adf9faef6b Mon Sep 17 00:00:00 2001 From: uramer Date: Sat, 11 Feb 2023 12:21:00 +0100 Subject: [PATCH] Error on missing arguments for the Teal script --- docs/build_teal.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/build_teal.sh b/docs/build_teal.sh index 0325842068..99cf60416b 100755 --- a/docs/build_teal.sh +++ b/docs/build_teal.sh @@ -1,5 +1,12 @@ -# Requires the LUAROCKS variable to be set to the luarocks/bin directory, e. g. `~/.luarocks/bin` -# takes an absolute path to the output directory as the argument +if [ -z "$LUAROCKS" ]; then + echo "Requires the LUAROCKS variable to be set to the luarocks/bin directory, e. g. `~/.luarocks/bin`" + exit +fi + +if [ -z "$1" ]; then + echo "Takes an absolute path to the output directory as the argument" + exit +fi DOCS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" FILES_DIR=$(realpath $DOCS_DIR/../files)