diff options
author | Arun Isaac | 2021-10-12 14:28:00 +0530 |
---|---|---|
committer | Arun Isaac | 2021-10-12 14:28:00 +0530 |
commit | db3c13ce159060d57364dcafbbafc6ec52ece981 (patch) | |
tree | 76b54e37f8a8062ef8c6390e415215569a6f12a8 | |
parent | 6a9f39aa381379e406e66ec6f0ba0c68e6ec9660 (diff) | |
download | ccwl-db3c13ce159060d57364dcafbbafc6ec52ece981.tar.gz ccwl-db3c13ce159060d57364dcafbbafc6ec52ece981.tar.lz ccwl-db3c13ce159060d57364dcafbbafc6ec52ece981.zip |
scripts: Wrap main body in function.
This makes it easier to record changes in the changelog of commit
messages.
* scripts/ccwl.in: Invoke main.
(main): New function.
-rwxr-xr-x | scripts/ccwl.in | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/scripts/ccwl.in b/scripts/ccwl.in index d0145d7..8093fa9 100755 --- a/scripts/ccwl.in +++ b/scripts/ccwl.in @@ -29,15 +29,18 @@ (ccwl ccwl) (ccwl cwl)) -(match (command-line) - ((_ "compile" input-file) - ;; FIXME: Compiling ccwl files fails since the workflow macro is - ;; unable to access command definitions. - (set! %load-should-auto-compile #f) - (workflow->cwl (load (canonicalize-path input-file)) - (current-output-port))) - ((program _ ...) - (format (current-error-port) - "Usage: ~a compile input-file~%" - program) - (exit #f))) +(define main + (match-lambda* + ((_ "compile" input-file) + ;; FIXME: Compiling ccwl files fails since the workflow macro is + ;; unable to access command definitions. + (set! %load-should-auto-compile #f) + (workflow->cwl (load (canonicalize-path input-file)) + (current-output-port))) + ((program _ ...) + (format (current-error-port) + "Usage: ~a compile input-file~%" + program) + (exit #f)))) + +(apply main (command-line)) |