From adddc04abe13c941ff9bf50de3572cb6dc400082 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 28 Sep 2022 22:40:08 -0500 Subject: add clean command --- vienna | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/vienna b/vienna index e32343d..25ba678 100755 --- a/vienna +++ b/vienna @@ -76,6 +76,10 @@ main() { # Configure configure "$@" shift "$((OPTIND - 1))" + # Further argument processing --- pre-build + case "$1" in + clean) rm -r "$OUTD" ;; + esac # Prepare cd "$WORKD" || exit 2 mkdir -p "$OUTD" || exit 2 @@ -94,10 +98,10 @@ main() { alias feedp=false # Copy static files static * || exit 2 - # If $1 is 'publish', yeet the out/ directory somewhere - if test "x$1" = xpublish; then - publish "$OUTD" - fi + # Further argument processing --- post-build + case "$1" in + publish) publish "$OUTD" ;; + esac } cleanup() { -- cgit 1.4.1-21-gabe81