diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-17 20:12:48 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-17 20:16:23 +0200 |
commit | 0da14caae5d3cf9533a2e82acb60267b9faee03f (patch) | |
tree | 05ddab0f6474e4901e14971ab67b747b807f7aa0 /module/c | |
parent | Remove (@ (global) basedir). (diff) | |
download | calp-0da14caae5d3cf9533a2e82acb60267b9faee03f.tar.gz calp-0da14caae5d3cf9533a2e82acb60267b9faee03f.tar.xz |
Fix global version var.
Diffstat (limited to '')
-rw-r--r-- | module/calp.scm | 4 | ||||
-rw-r--r-- | module/calp/main.scm | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/module/calp.scm b/module/calp.scm new file mode 100644 index 00000000..43fa4707 --- /dev/null +++ b/module/calp.scm @@ -0,0 +1,4 @@ +(define-module (calp)) + +;; Update me on new release +(define-public version "0.5") diff --git a/module/calp/main.scm b/module/calp/main.scm index 2e08fd0f..ee49c250 100644 --- a/module/calp/main.scm +++ b/module/calp/main.scm @@ -23,7 +23,7 @@ (define options - '((statprof (value display-style) + `((statprof (value display-style) (description "Run the program within Guile's built in statical " "profiler. Display style is one of " (b "flat") " or " (b "tree") ".")) @@ -53,6 +53,9 @@ "Can " (i "not") " be given with an equal after --option." (br) "Can be given multiple times.")) + (version (single-char #\v) + (description "Display version, which is " ,(@ (calp) version) " btw.")) + (update-zoneinfo) (help (single-char #\h) @@ -152,6 +155,10 @@ (throw 'return) ) + (when (option-ref opts 'version #f) + (format #t "Calp version ~a~%" (@ (calp) version)) + (throw 'return)) + (when (option-ref opts 'update-zoneinfo #f) (let ((pipe (let-env ((PREFIX (get-config 'path-prefix))) |