make→pelican

This commit is contained in:
Marc Beninca 2022-03-13 18:24:39 +01:00
parent 68cf025fed
commit 3d9fe28da6

View file

@ -1,7 +1,18 @@
#! /usr/bin/env bash #! /usr/bin/env bash
BASH_FILE="$(realpath "${BASH_SOURCE[0]}")"
BASH_ROOT="$(dirname "${FILE}")"
cd "${BASH_ROOT}" SETTINGS='settings.py'
make 'clean'
make 'publish' 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 "${@}"