Add help text for rundev.sh
This commit is contained in:
parent
9a0f30edfb
commit
89fd513be0
1 changed files with 8 additions and 1 deletions
|
@ -1,12 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
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")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
if [[ ! -f config ]]; then
|
if [[ ! -f config ]]; then
|
||||||
read -p 'Server URL (e.g. `https://mattermost.example.com`): ' MATTERMOST_REMOTE
|
read -p 'Server URL (e.g. `https://mattermost.example.com`): ' MATTERMOST_REMOTE
|
||||||
echo "MATTERMOST_REMOTE='${MATTERMOST_REMOTE//\//}'" > config
|
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
|
fi
|
||||||
source "config"
|
source "config"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue