(check-and-exec description cli-options function args)
(check-and-exec description cli-options function args ctx)
Check command-line arguments and if ok execute the given function. System/exit when the function is done, wrt hanging child-processes. The function should expect 2 params: the :options and :arguments parts of parsed options. Params: description - one line description of tool cli-options - vector of options according to tools.cli script - the function to execute args - arguments given on command-line, as a sequence ctx - context, a map. Could contain :script and :cwd
Check command-line arguments and if ok execute the given function. System/exit when the function is done, wrt hanging child-processes. The function should expect 2 params: the :options and :arguments parts of parsed options. Params: description - one line description of tool cli-options - vector of options according to tools.cli script - the function to execute args - arguments given on command-line, as a sequence ctx - context, a map. Could contain :script and :cwd
(expand-home path)
My version of fs/expand-home, using normalized in this namespace. Make sure we return a File object
My version of fs/expand-home, using normalized in this namespace. Make sure we return a File object
(normalized s)
Just replace / characters with system specific path separator. For use with (fs/expand-home) fs/normalized adds the current working dir (cwd), which gives a chicken/egg problem
Just replace / characters with system specific path separator. For use with (fs/expand-home) fs/normalized adds the current working dir (cwd), which gives a chicken/egg problem
(parse-opts args cli-options)
Wrapper around cli/parse-opts that reads config file. Handles default parameters like this:
Wrapper around cli/parse-opts that reads config file. Handles default parameters like this: 1. explicitly on cmdline 2. or else given in config file 3. or else use default value
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close