This repository has been archived on 2023-02-03. You can view files and clone it, but cannot push or open issues or pull requests.
autonomic.zone/sbin/entrypoint.sh

35 lines
600 B
Bash
Raw Normal View History

2020-03-31 12:37:09 +00:00
#!/bin/bash
set -eu -o pipefail
# Fire up Jekyll with the right configuration
run_jekyll() {
set -eu
# shellcheck disable=SC2155
2020-04-23 11:48:24 +00:00
local args="--config $JEKYLL_CONFIG --trace --verbose"
# shellcheck disable=SC2086
bundle exec jekyll build $args
# shellcheck disable=SC2155
local args="${args} --host $JEKYLL_HOST --port $JEKYLL_PORT"
if [[ $JEKYLL_ENV == "development" ]]; then
# shellcheck disable=SC2155
local args="${args} --incremental"
fi
2020-04-23 11:48:24 +00:00
# shellcheck disable=SC2086
bundle exec jekyll serve $args
2020-03-31 12:37:09 +00:00
}
# Main entrypoint
main() {
set -eu
run_jekyll
}
main