Remove trailing slashes instead of complaining
This commit is contained in:
parent
1760661c5b
commit
5864884f97
1 changed files with 1 additions and 10 deletions
11
rundev.sh
11
rundev.sh
|
@ -3,21 +3,12 @@ set -euo pipefail
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
check_remote() {
|
|
||||||
if [[ $MATTERMOST_REMOTE == */ ]]; then
|
|
||||||
echo "MATTERMOST_REMOTE should not end with a slash (it should only the protocol and the domain; no path)" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
check_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`.'
|
||||||
fi
|
fi
|
||||||
source "config"
|
source "config"
|
||||||
check_remote
|
|
||||||
|
|
||||||
server_pid=0
|
server_pid=0
|
||||||
finish() {
|
finish() {
|
||||||
|
|
Loading…
Reference in a new issue