Skip to content

Commit

Permalink
fix regression introduced by PR #359 "Flexible locations for data ser…
Browse files Browse the repository at this point in the history
…ved by thredds"

In PR #359:

`secure-thredds/config/magpie/permissions.cfg` started to use variable
but was never renamed to `.template` so those variable never get
template expanded (commit 317d96c).

`bootstrap-testdata` default value was removed but did not source
`read-configs.include.sh` so the variable stayed blank (commit
4ab0fc7).  The default value was there
initially so the script can be used in standalone situation (not inside a
checkout).
  • Loading branch information
tlvu committed Nov 21, 2024
1 parent 5c9f362 commit 237eae4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
permissions.cfg
18 changes: 17 additions & 1 deletion birdhouse/scripts/bootstrap-testdata
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@
# Need write-access to DATASET_ROOT (/data/datasets/).


THIS_FILE="$(readlink -f "$0" || realpath "$0")"
THIS_DIR="$(dirname "${THIS_FILE}")"
COMPOSE_DIR="${COMPOSE_DIR:-$(dirname "${THIS_DIR}")}"

if [ -f "${COMPOSE_DIR}/read-configs.include.sh" ]; then
. "${COMPOSE_DIR}/read-configs.include.sh"

# Get THREDDS_SERVICE_DATA_LOCATION_ON_HOST
read_configs
fi


if [ -z "${DATASET_ROOT}" ]; then
DATASET_ROOT="${BIRDHOUSE_DATA_PERSIST_ROOT}/${THREDDS_SERVICE_DATA_LOCATION_ON_HOST}"
# Default for when unable to source read-configs.include.sh (ie when
# used standalone outside of the checkout).
DATASET_ROOT="${THREDDS_SERVICE_DATA_LOCATION_ON_HOST:=/data/datasets}"
fi

FROM_SERVER=${FROM_SERVER:-"https://pavics.ouranos.ca/twitcher/ows/proxy/thredds/fileServer/birdhouse"}
Expand Down Expand Up @@ -39,6 +53,8 @@ for afile in ${FILE_LIST}; do
if [ ! -d "${PARENT_DIRS}" ]; then
mkdir -p "${PARENT_DIRS}"
fi
set -e # Fail on error.
curl "${FROM_SERVER}/${afile}" --output "${afile}"
set +e
fi
done

0 comments on commit 237eae4

Please sign in to comment.