diff options
author | Case Duckworth | 2022-09-28 22:40:08 -0500 |
---|---|---|
committer | Case Duckworth | 2022-09-28 22:40:08 -0500 |
commit | adddc04abe13c941ff9bf50de3572cb6dc400082 (patch) | |
tree | 96cf466ca173ec0aea9587b28526c2a88bf03dd0 | |
parent | add usage (diff) | |
download | vienna-adddc04abe13c941ff9bf50de3572cb6dc400082.tar.gz vienna-adddc04abe13c941ff9bf50de3572cb6dc400082.zip |
add clean command
-rwxr-xr-x | vienna | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vienna b/vienna index e32343d..25ba678 100755 --- a/vienna +++ b/vienna | |||
@@ -76,6 +76,10 @@ main() { | |||
76 | # Configure | 76 | # Configure |
77 | configure "$@" | 77 | configure "$@" |
78 | shift "$((OPTIND - 1))" | 78 | shift "$((OPTIND - 1))" |
79 | # Further argument processing --- pre-build | ||
80 | case "$1" in | ||
81 | clean) rm -r "$OUTD" ;; | ||
82 | esac | ||
79 | # Prepare | 83 | # Prepare |
80 | cd "$WORKD" || exit 2 | 84 | cd "$WORKD" || exit 2 |
81 | mkdir -p "$OUTD" || exit 2 | 85 | mkdir -p "$OUTD" || exit 2 |
@@ -94,10 +98,10 @@ main() { | |||
94 | alias feedp=false | 98 | alias feedp=false |
95 | # Copy static files | 99 | # Copy static files |
96 | static * || exit 2 | 100 | static * || exit 2 |
97 | # If $1 is 'publish', yeet the out/ directory somewhere | 101 | # Further argument processing --- post-build |
98 | if test "x$1" = xpublish; then | 102 | case "$1" in |
99 | publish "$OUTD" | 103 | publish) publish "$OUTD" ;; |
100 | fi | 104 | esac |
101 | } | 105 | } |
102 | 106 | ||
103 | cleanup() { | 107 | cleanup() { |