-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_source_first.sh
33 lines (24 loc) · 1.2 KB
/
sample_source_first.sh
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
#!/bin/bash
## USAGE:
## run this script from the outer "stuff" directory, like:
## $ source ./source_first.sh
## check current directory -----------------------------------------------
current_dir=$(basename "$PWD")
if [[ "$current_dir" == *stuff || "$current_dir" == *outer ]]; then
echo "Running script in a valid directory."
else
echo "Error: This script must be run from a directory ending in 'stuff' or 'outer'."
exit 1
fi
## `u97__` envars are used by this `bdr_update_97_org_items` code --------
export U97__LOGLEVEL="DEBUG"
export U97__MODS_URL_PATTERN="url-to/storage/{PID}/MODS/" # should match server for `UM__API_ROOT_URL` envar
export U97__POST_MODS_BINARY_PATH="/path/to/update_mods_py_binary"
## the `UM__` envars are used by the `update_mods_py_binary` -------------
export UM__API_AGENT="update_mods_script.py"
export UM__API_IDENTITY="THE:SHIB:IDENTITY" # the shib-identity
export UM__API_ROOT_URL="api/private/url" # the root api-url, used to build the full api-url
export UM__LOGLEVEL="DEBUG"
export UM__MESSAGE="adds indicator to MODS that this is an organization-item"
## venv ------------------------------------------------------------------
source ../env/bin/activate