diff --git a/down-develop.sh b/down-develop.sh index f2bfcfe..a1ad1a6 100644 --- a/down-develop.sh +++ b/down-develop.sh @@ -3,7 +3,13 @@ export COMPOSE_PROJECT=codex-develop CODEX_REPOS=${CODEX_REPOS:-"codex-keycloak,codex-feasibility-gui,codex-feasibility-backend,codex-flare"} -baseDir=$(pwd) + +readlink "$0" > /dev/null +if [ $? -ne 0 ]; then + baseDir=$(dirname "$0") +else + baseDir=$(dirname "$(readlink "$0")") +fi for repoName in ${CODEX_REPOS//,/ } @@ -31,4 +37,4 @@ do docker-compose -p $COMPOSE_PROJECT down fi fi -done \ No newline at end of file +done diff --git a/gitUpdate.sh b/gitUpdate.sh index 6e68c4b..e21d7c6 100644 --- a/gitUpdate.sh +++ b/gitUpdate.sh @@ -2,7 +2,13 @@ gitBase="https://github.com/num-codex/" repos=("codex-feasibility-gui" "codex-feasibility-backend" "codex-keycloak" "codex-processes-ap2" "codex-aktin-broker" "codex-sq2cql" "num-knoten" "broker" "codex-flare") -baseDir=$(pwd) + +readlink "$0" > /dev/null +if [ $? -ne 0 ]; then + baseDir=$(dirname "$0") +else + baseDir=$(dirname "$(readlink "$0")") +fi echo "****updating base repo Develop****" git pull diff --git a/rebuild-develop.sh b/rebuild-develop.sh index 1667c0e..f3a4106 100644 --- a/rebuild-develop.sh +++ b/rebuild-develop.sh @@ -3,7 +3,13 @@ export COMPOSE_PROJECT=codex-develop CODEX_REPOS=${CODEX_REPOS:-"codex-keycloak,codex-feasibility-gui,codex-feasibility-backend,codex-flare"} -baseDir=$(pwd) + +readlink "$0" > /dev/null +if [ $? -ne 0 ]; then + baseDir=$(dirname "$0") +else + baseDir=$(dirname "$(readlink "$0")") +fi for repoName in ${CODEX_REPOS//,/ } diff --git a/start-develop.sh b/start-develop.sh index 5337c50..d68b28f 100644 --- a/start-develop.sh +++ b/start-develop.sh @@ -2,9 +2,15 @@ export COMPOSE_PROJECT=codex-develop -baseDir=$(pwd) CODEX_REPOS=${CODEX_REPOS:-"codex-keycloak,codex-feasibility-gui,codex-feasibility-backend,codex-flare"} +readlink "$0" > /dev/null +if [ $? -ne 0 ]; then + baseDir=$(dirname "$0") +else + baseDir=$(dirname "$(readlink "$0")") +fi + export CODEX_CONCEPT_TREE_PATH=${CODEX_CONCEPT_TREE_PATH:-"$baseDir/ontology/codex-code-tree.json"} export CODEX_TERM_CODE_MAPPING_PATH=${CODEX_TERM_CODE_MAPPING_PATH:-"$baseDir/ontology/term-code-mapping.json"} diff --git a/stop-develop.sh b/stop-develop.sh index 60d6497..f99c889 100644 --- a/stop-develop.sh +++ b/stop-develop.sh @@ -3,7 +3,13 @@ export COMPOSE_PROJECT=codex-develop CODEX_REPOS=${CODEX_REPOS:-"codex-keycloak,codex-feasibility-gui,codex-feasibility-backend,codex-flare"} -baseDir=$(pwd) + +readlink "$0" > /dev/null +if [ $? -ne 0 ]; then + baseDir=$(dirname "$0") +else + baseDir=$(dirname "$(readlink "$0")") +fi for repoName in ${CODEX_REPOS//,/ }