minor formatting improvements

This commit is contained in:
Akis Kesoglou 2018-10-21 02:03:46 +02:00
parent 5c16c5c3c9
commit 15485bfec7
5 changed files with 25 additions and 26 deletions

View File

@ -24,11 +24,11 @@ command. If you wish to run the platform under a specific domain name,
you can specify it as the second argument. The default is `openbalena.local`.
For example:
$ ./scripts/start-project mydeployment my.domain.com
$ ./scripts/start-project -n mydeployment -d mydomain.com
You can create as many deployments as needed and switch between them using:
$ ./scripts/select-project mydeployment
$ ./scripts/select-project -n mydeployment
Remove all traces of a project by deleting its folder.

View File

@ -6,5 +6,5 @@
# when specifying multiple configs and open-balena always specifying
# `compose/services.yml` as the "base" config.
#
# You may view the effective config with `scripts/run-fig-command config`.
# You may view the effective config with `scripts/compose config`.
version: '2.1'

View File

@ -1,7 +1,5 @@
#!/bin/bash -e
SERVICES="api registry vpn db s3 redis"
usage() {
echo "usage: $0 DOMAIN"
echo
@ -14,6 +12,7 @@ if [ -z "$1" ]; then
exit 1
fi
SERVICES="api registry vpn db s3 redis"
DOMAIN="$1"
# We need sudo to write to /etc/hosts, so first write to a temp file and then

View File

@ -1,9 +1,5 @@
#!/bin/bash -e
CMD="$0"
DIR="$(dirname "$CMD")"
BASE_DIR="$(dirname "$DIR")"
usage() {
echo "usage: $0 PROJECT_PATH"
echo
@ -16,8 +12,12 @@ if [ -z "$1" ]; then
exit 1
fi
CMD="$0"
DIR="$(dirname "${CMD}")"
BASE_DIR="$(dirname "${DIR}")"
PROJECT_PATH="$1"
PROJECT_DIR="$(realpath "$PROJECT_PATH")"
PROJECT_DIR="$(realpath "${PROJECT_PATH}")"
if [ ! -d "$PROJECT_DIR" ]; then
echo 'Project path refers to a directory that does not exist.'

View File

@ -1,8 +1,8 @@
#!/bin/bash -e
CMD=$0
DIR=$(dirname "$CMD")
BASE_DIR=$(dirname "$DIR")
CMD="$0"
DIR=$(dirname "${CMD}")
BASE_DIR=$(dirname "${DIR}")
PROJECT_NAME=demo
DOMAIN=openbalena.local
@ -19,17 +19,17 @@ usage() {
show_help=false
patch_hosts=false
while getopts ":hpn:d:" opt; do
case "${opt}" in
h) show_help=true;;
p) patch_hosts=true;;
n) PROJECT_NAME="${OPTARG}";;
d) DOMAIN="${OPTARG}";;
*)
echo "Invalid argument: -${OPTARG}"
usage
exit 1
;;
esac
case "${opt}" in
h) show_help=true;;
p) patch_hosts=true;;
n) PROJECT_NAME="${OPTARG}";;
d) DOMAIN="${OPTARG}";;
*)
echo "Invalid argument: -${OPTARG}"
usage
exit 1
;;
esac
done
shift $((OPTIND-1))
@ -37,8 +37,8 @@ PROJECT_DIR="$(pwd)/${PROJECT_NAME}"
CERTS_DIR="${PROJECT_DIR}/certs"
if [ "$show_help" = "true" ]; then
usage
exit 1
usage
exit 1
fi
echo_bold() {