diff --git a/build.sh b/build.sh index 6e483d0..b737549 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,18 @@ #! /usr/bin/env bash -BASH_FILE="$(realpath "${BASH_SOURCE[0]}")" -BASH_ROOT="$(dirname "${FILE}")" -cd "${BASH_ROOT}" -make 'clean' -make 'publish' +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 "${@}"