-
Notifications
You must be signed in to change notification settings - Fork 3
/
mgctl-sandbox.env
39 lines (33 loc) · 1.28 KB
/
mgctl-sandbox.env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
findInAncestors() {
# from: https://www.npmjs.com/package/find-config#algorithm
# 1. If X/file.ext exists and is a regular file, return it. STOP
# 2. If X has a parent directory, change X to parent. GO TO 1
# 3. Return NULL.
if [ -d "$1" ]; then
printf '%s\n' "${PWD%/}/$1"
elif [ "$PWD" = / ]; then
false
else
# a subshell so that we don't affect the caller's $PWD
(cd .. && findInAncestors "$1")
fi
}
export WS_GITHUB_HOME=$(findInAncestors github.com)
export WS_GITHUB_REL=$(realpath --relative-to="$PWD" "$WS_GITHUB_HOME")
# Medigy Governance sandbox locations (for development/testing)
export MGHOME="$WS_GITHUB_REL/medigy/governance"
export MGMOD="${MGHOME}/mod.ts"
export MGCTL="${MGHOME}/mgctl.ts"
alias mgctl="deno run -A --unstable $MGCTL"
# NIH LHC Form Typer sandbox locations (for development/testing)
export LFORMHOME="$WS_GITHUB_REL/shah/ts-lhncbc-lforms"
export LFORMCTL="${LFORMHOME}/lformctl.ts"
alias lformctl="deno run -A --unstable $LFORMCTL"
# GovSuite GSD engineering sandbox locations (for development/testing)
export GDHOME="$WS_GITHUB_REL/gov-suite/governed-structured-data"
export GDMOD="${GDHOME}/mod.ts"
export GDCTL="${GDHOME}/gdctl.ts"
alias gdctl="deno run -A --unstable $GDCTL"
alias | grep mgctl
alias | grep lformctl
alias | grep gdctl