summaryrefslogtreecommitdiff
path: root/sly/cli.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sly/cli.scm')
-rw-r--r--sly/cli.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/sly/cli.scm b/sly/cli.scm
index b4040d0..49b5070 100644
--- a/sly/cli.scm
+++ b/sly/cli.scm
@@ -19,6 +19,7 @@
#:use-module (ice-9 format)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-37)
+ #:use-module (sly config)
#:use-module (sly game)
#:use-module (sly input keyboard)
#:use-module (sly repl)
@@ -77,6 +78,10 @@
(lambda _
(show-help)
(exit 0)))
+ (option '(#\V "version") #f #f
+ (lambda _
+ (show-version)
+ (exit 0)))
(option '(#\d "develop") #f #f
(lambda (opt name arg result)
(alist-cons 'develop? #t result)))))
@@ -85,9 +90,19 @@
(display "Usage: sly [OPTION]... GAME-DIRECTORY
Run the Sly game located in GAME-DIRECTORY.\n")
(display "
+ -v, --version Display version information")
+ (display "
-d, --develop Run in development mode")
(newline))
+(define (show-version)
+ (format #t "sly ~a~%" %sly-version)
+ (display "Copyright (C) 2016 the Sly authors
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.")
+ (newline))
+
(define (sly-main args)
(let* ((opts (args-fold args
%options