Changeset View
Changeset View
Standalone View
Standalone View
scripts/fetch_markdown_files.sh
#!/usr/bin/env bash | |||||
# Pull all the markdown files from the ABC repository so they can be converted | # Pull all the markdown files from the ABC repository so they can be converted | ||||
# and rendered by jekyll. The tree directory structure is preserved in order to | # and rendered by jekyll. The tree directory structure is preserved in order to | ||||
# keep the links working. | # keep the links working. | ||||
# The path to the ABC repository must be passed as a command line argument. | # The path to the ABC repository must be passed as a command line argument. | ||||
set -euxo pipefail | |||||
SRC_DIR=$1 | SRC_DIR=$1 | ||||
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) | ||||
TOPLEVEL=$(git -C "${SCRIPT_DIR}" rev-parse --show-toplevel) | TOPLEVEL=$(git -C "${SCRIPT_DIR}" rev-parse --show-toplevel) | ||||
cd "${SRC_DIR}" | cd "${SRC_DIR}" | ||||
ABC_MD_DOCS_BASE="${TOPLEVEL}/abc_md_docs" | ABC_MD_DOCS_BASE="${TOPLEVEL}/abc_md_docs" | ||||
Show All 14 Lines |