From b6a0b340ceb01b8636be84a29d216cab8961e039 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 9 Jan 2023 00:00:21 -0600 Subject: Move preprocess --- vienna | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/vienna b/vienna index e1263ea..bd63a3e 100755 --- a/vienna +++ b/vienna @@ -92,8 +92,6 @@ main() { shift "$((OPTIND - 1))" # Prepare cd "$WORKDIR" || exit 2 - # Further argument processing --- pre-build - preprocess "$@" || shift # Source config if test -f "$CONFIG"; then # Source ./.vienna.sh, if it exists. @@ -113,6 +111,8 @@ main() { yornp "Continue building? (y/N)" || exit 2 fi fi + # Further argument processing --- pre-build + preprocess "$@" || shift log vienna config # Log configuration variables log config 'base url': "$URL_ROOT" @@ -150,10 +150,6 @@ main() { } preprocess() { - case "$*" in - *preview*) DOMAIN=http://localhost:${VIENNA_PREVIEW_PORT:-8000} ;; - esac - case "${1:-ok}" in ok) ;; init) @@ -210,7 +206,7 @@ directory that tells me what to do. EOF exit 3 } -alias publish=_publish +publish() { _publish; } _preview() { cat <&2 @@ -225,7 +221,7 @@ in this directory that tells me what to do. EOF exit 3 } -alias preview=_preview +preview() { _preview; } initialize() { # initialize log init "$CONFIG" -- cgit 1.4.1-21-gabe81