~ chicken-core (chicken-5) 38d3f52ffe2a8bed74a709e57859ada79a9fdeb1
commit 38d3f52ffe2a8bed74a709e57859ada79a9fdeb1
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Mon Feb 22 14:04:40 2016 +1300
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Wed Feb 24 21:01:17 2016 +0100
Print "chicken-install -repository" after processing all arguments
Without this, the sanity check that requires a prefix to be given when
the "-deploy" option is used is never triggered, and running the command
"chicken-install -deploy -repository" just prints "#f".
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/chicken-install.scm b/chicken-install.scm
index f13a1f46..74201605 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -854,6 +854,7 @@ EOF
(let ((update #f)
(scan #f)
(listeggs #f)
+ (print-repository #f)
(rx (irregex "([^:]+):(.+)")))
(setup-proxy (get-environment-variable "http_proxy"))
(let loop ((args args) (eggs '()))
@@ -862,7 +863,8 @@ EOF
(unless *prefix*
(error
"`-deploy' only makes sense in combination with `-prefix DIRECTORY`")))
- (cond (update (update-db))
+ (cond (print-repository (print (repo-path)))
+ (update (update-db))
(scan (scan-directory scan))
(else
(let ((defaults (load-defaults)))
@@ -915,8 +917,8 @@ EOF
(string=? arg "--help"))
(usage 0))
((string=? arg "-repository")
- (print (repo-path))
- (exit 0))
+ (set! print-repository #t)
+ (loop (cdr args) eggs))
((string=? arg "-force")
(set! *force* #t)
(loop (cdr args) eggs))
Trap