generated from norlab-ulaval/template-norlab-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.n2st
30 lines (27 loc) · 1.44 KB
/
.env.n2st
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
# =================================================================================================
#
# Set 'norlab-shell-script-tools' environment variables. Those are available for convenience
# and are also required by 'norlab-shell-script-tools' library internal logic.
#
# Usage:
#
# Important! Source this file from 'norlab-build-system' repository root
# $ cd <path/to/norlab-shell-script-tools/>
# $ set -o allexport && source .env.n2st && set +o allexport
#
# =================================================================================================
PROJECT_PROMPT_NAME="${PROJECT_PROMPT_NAME:-N2ST}"
# ....Programaticaly fetch source code information.................................................
PROJECT_GIT_REMOTE_URL="https://github.com/norlab-ulaval/norlab-shell-script-tools.git"
PROJECT_GIT_NAME=$( basename "${PROJECT_GIT_REMOTE_URL}" .git )
PROJECT_PATH=$( git rev-parse --show-toplevel )
PROJECT_SRC_NAME="$( basename ${PROJECT_PATH} )"
# ....Set N2ST related environment variable with their own prefix..................................
# Note: Those with "PROJECT_" prefix will get eventualy overiden in the case where N2ST is used
# as a library. Using generic testing logic require that environment variables with
# "PROJECT_" prefix be available.
N2ST_PROMPT_NAME="N2ST"
N2ST_GIT_REMOTE_URL="${PROJECT_GIT_REMOTE_URL}"
N2ST_GIT_NAME="${PROJECT_GIT_NAME}"
N2ST_PATH="${PROJECT_PATH}"
N2ST_SRC_NAME="${PROJECT_SRC_NAME}"