blog/build.sh
2022-03-13 18:24:39 +01:00

18 lines
317 B
Bash
Executable file

#! /usr/bin/env bash
SETTINGS='settings.py'
function main {
local file="$(realpath "${BASH_SOURCE[0]}")"
local root="$(dirname "${file}")"
local args=()
case "${1}" in
'') args+='--print-settings' ;;
esac
cd "${root}"
pelican \
--settings "${SETTINGS}" \
"${args[@]}"
}
main "${@}"