From ced9f04cf5157b676e6c7c2b045b0d21f09d5b91 Mon Sep 17 00:00:00 2001 From: Override-6 Date: Sat, 7 Jan 2023 20:59:10 +0100 Subject: [PATCH] translated all texts to english --- entrypoint.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 47cb1a1..17de62a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,8 +5,23 @@ echo "Repository owner: $DRONE_REPO_OWNER" echo "Generating and deploying documentation for user $DRONE_REPO_OWNER and repository $DRONE_REPO_NAME" +help() { + cat << EOF +usage: $0 + -d --dir [dir] path to the documentation root - required + -t --type [docusaurus|doxygen|swagger] type of documentation generator to use. - required + -l --dest [dir] path to where to put the documentation outputs in your CodeDoc space - optional +EOF + exit 1 +} + +DEST="" while [ "$1" ]; do case "$1" in + "-l" | "--dest") + DEST="$2" + shift 1 + ;; "-d" | "--dir") DOC_DIR="$2" shift 1 @@ -28,8 +43,9 @@ while [ "$1" ]; do shift done -if [ ! "$GENERATOR_SCRIPT" ] || [ ! "$DOC_DIR" ]; then - echo "option -t obligatoire" >&2 +if [ ! "$GENERATOR_SCRIPT" ] || [ ! "$DOC_DIR" ] || echo "$DEST" | grep -E -q "^[\/].*"; then + echo "$0: bad usage" >&2 + help fi . "$GENERATOR_SCRIPT"