-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
629f43c
commit 29c4268
Showing
2 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# To provide files via a CDN from TACC at a specific commit | ||
BASE_URL="https://cdn.jsdelivr.net/gh/TACC/TACC-Docs@v0.15.1" | ||
# What version of TACC-Docs to use | ||
TACC_VER=v0.15.1 | ||
# Where to get files from TACC | ||
BASE_URL="https://cdn.jsdelivr.net/gh/TACC/TACC-Docs@${TACC_VER}" | ||
# Get the directory where the script resides | ||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" | ||
# Create a temporary directory for the TACC docs | ||
TACC_DIR="${ROOT_DIR}/_temp-tacc-docs-for-ds" | ||
|
||
# To avoid the error: | ||
# > ERROR - Config value 'theme': The path set in custom_dir | ||
# > ('.../user-guide/themes/tacc-readthedocs') does not exist. | ||
mkdir -p ./user-guide/themes/tacc-readthedocs | ||
# So authors can preview with TACC features but without Docker | ||
curl -o "${ROOT_DIR}/user-guide/mkdocs.base.yml" ${BASE_URL}/mkdocs.base.yml | ||
curl -o "${ROOT_DIR}/user-guide/poetry.lock" ${BASE_URL}/poetry.lock | ||
curl -o "${ROOT_DIR}/user-guide/pyproject.toml" ${BASE_URL}/pyproject.toml | ||
|
||
# To clone TACC files (so authors can preview without Docker) | ||
# TODO: Make TACC/TACC-Docs public, so we can load from TACC/TACC-Docs via CDN | ||
curl -o ./user-guide/mkdocs.base.yml ${BASE_URL}/mkdocs.base.yml | ||
curl -o ./user-guide/poetry.lock ${BASE_URL}/poetry.lock | ||
curl -o ./user-guide/pyproject.toml ${BASE_URL}/pyproject.toml | ||
# So authors can preview with TACC design but without Docker | ||
mkdir -p "${ROOT_DIR}/user-guide/themes/tacc-readthedocs" | ||
git clone -q --depth 1 --branch ${TACC_VER} https://github.com/TACC/TACC-Docs.git ${TACC_DIR} | ||
cp -r ${TACC_DIR}/themes/tacc-readthedocs "${ROOT_DIR}/user-guide/themes/" | ||
cp -r ${TACC_DIR}/docs/css/core "${ROOT_DIR}/user-guide/docs/css/" | ||
cp -r ${TACC_DIR}/docs/js/core "${ROOT_DIR}/user-guide/docs/js/" | ||
rm -rf ${TACC_DIR} |