initial
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONFIG=""
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 --config <json-file>"
|
||||
}
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--config)
|
||||
CONFIG="$2"
|
||||
shift 2
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $1" >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$CONFIG" ]]; then
|
||||
echo "Missing --config" >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [[ ! -f "$CONFIG" ]]; then
|
||||
echo "Config file not found: $CONFIG" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd $(realpath $(dirname $0))
|
||||
./run.sh --config $CONFIG --command "up -d" --sleep 10
|
||||
Reference in New Issue
Block a user