File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 33# # start Structurizr Lite with the given workspace file, relative to the current working directory. Omit the file extension.
44# # Optional second argument of a port number to use. Default is 8085.
55
6+ SCRIPT_PATH=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
7+ SCRIPT_DIR=$( basename " $SCRIPT_PATH " )
8+ PROJ_DIR=$( dirname " $SCRIPT_PATH " )
9+
10+ echo $SCRIPT_PATH
11+ echo $PROJ_DIR
12+
613echo " hosting on http://localhost:${PORT:= ${2:- 8085} } "
714# Check if the workspace file exists
8- if [ ! -f " $1 .dsl" ]; then
9- echo " Workspace file $1 does not exist."
15+ if [ ! -f " $SCRIPT_PATH / $ 1 .dsl" ]; then
16+ echo " Workspace file $1 .dsl does not exist in $SCRIPT_PATH ."
1017 exit 1
1118fi
1219
13- docker run -it --rm -p $PORT :8080 -v $( pwd) :/usr/local/structurizr -e STRUCTURIZR_WORKSPACE_FILENAME=$1 structurizr/lite
20+ echo " Loading workspace file: $SCRIPT_PATH /$1 .dsl"
21+
22+ docker run -it --rm -p $PORT :8080 -v $PROJ_DIR :/usr/local/structurizr -e STRUCTURIZR_WORKSPACE_FILENAME=$SCRIPT_DIR /$1 structurizr/lite
You can’t perform that action at this time.
0 commit comments