From db3c13ce159060d57364dcafbbafc6ec52ece981 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 12 Oct 2021 14:28:00 +0530 Subject: 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. --- scripts/ccwl.in | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'scripts') 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)) -- cgit v1.2.3