summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArun Isaac2021-10-12 14:28:00 +0530
committerArun Isaac2021-10-12 14:28:00 +0530
commitdb3c13ce159060d57364dcafbbafc6ec52ece981 (patch)
tree76b54e37f8a8062ef8c6390e415215569a6f12a8 /scripts
parent6a9f39aa381379e406e66ec6f0ba0c68e6ec9660 (diff)
downloadccwl-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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ccwl.in27
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))