From 89fd513be070773c99e31faaa03e73286213cd9b Mon Sep 17 00:00:00 2001 From: Midgard Date: Wed, 8 Jun 2022 18:03:38 +0200 Subject: [PATCH] Add help text for rundev.sh --- rundev.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rundev.sh b/rundev.sh index 6d46401..4baea7d 100755 --- a/rundev.sh +++ b/rundev.sh @@ -1,12 +1,19 @@ #!/bin/bash set -euo pipefail +if [[ "${1:-}" == --help ]] || [[ "${1:-}" == -h ]]; then + echo "Feathermost rundev.sh: Run two things:" >&2 + echo " - a HTTP server to serve the web application" >&2 + echo " - a proxy server for a Mattermost instance to avoid CORS problems" >&2 + exit +fi + cd "$(dirname "$0")" if [[ ! -f config ]]; then read -p 'Server URL (e.g. `https://mattermost.example.com`): ' MATTERMOST_REMOTE echo "MATTERMOST_REMOTE='${MATTERMOST_REMOTE//\//}'" > config - echo 'You can change this later by editing the file `config`.' + echo 'You can change this later by editing the file `config`.' >&2 fi source "config"