diff options
author | Case Duckworth | 2023-01-06 22:04:31 -0600 |
---|---|---|
committer | Case Duckworth | 2023-01-06 22:04:50 -0600 |
commit | da7171938a6f30480103df8a66c7bf67c5676bcf (patch) | |
tree | f532a3a0d5fa76560ab380898473e05e11b6014b | |
parent | Change gencheckglob calling convention (diff) | |
download | vienna-da7171938a6f30480103df8a66c7bf67c5676bcf.tar.gz vienna-da7171938a6f30480103df8a66c7bf67c5676bcf.zip |
Allow cleaning to continue the script when paired
-rwxr-xr-x | vienna | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vienna b/vienna index 6af1eb4..1d060ce 100755 --- a/vienna +++ b/vienna | |||
@@ -87,7 +87,7 @@ main() { | |||
87 | configure "$@" | 87 | configure "$@" |
88 | shift "$((OPTIND - 1))" | 88 | shift "$((OPTIND - 1))" |
89 | # Further argument processing --- pre-build | 89 | # Further argument processing --- pre-build |
90 | preprocess "$@" | 90 | preprocess "$@" || shift |
91 | # Prepare | 91 | # Prepare |
92 | cd "$WORKD" || exit 2 | 92 | cd "$WORKD" || exit 2 |
93 | if test -f "$CONFIG"; then | 93 | if test -f "$CONFIG"; then |
@@ -142,10 +142,14 @@ preprocess() { | |||
142 | case "${1:-ok}" in | 142 | case "${1:-ok}" in |
143 | ok) ;; | 143 | ok) ;; |
144 | clean) | 144 | clean) |
145 | log vienna "clean" | 145 | log vienna clean |
146 | rm -r "$OUTD" | 146 | rm -r "$OUTD" |
147 | cleanup | 147 | cleanup |
148 | exit | 148 | if [ $# -eq 0 ]; then |
149 | exit # Quit when only cleaning | ||
150 | else | ||
151 | return 1 # Otherwise, continue processing | ||
152 | fi | ||
149 | ;; | 153 | ;; |
150 | esac | 154 | esac |
151 | } | 155 | } |