From 3d9fe28da61d3d9acbfb31e6e5ac223812be9485 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 13 Mar 2022 18:24:39 +0100 Subject: [PATCH] =?UTF-8?q?make=E2=86=92pelican?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) 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 "${@}"