summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/tissue28
1 files changed, 17 insertions, 11 deletions
diff --git a/bin/tissue b/bin/tissue
index 7b2c154..e047929 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -215,20 +215,26 @@ Export the repository as a website to OUTPUT-DIRECTORY.
(string->number
(substring listen (1+ (string-index-right listen #\:))))))))
+(define %default-config-file
+ "/etc/tissue.conf")
+
(define (default-configuration)
"Return the default configuration options for the `tissue pull' and
`tissue run-web' subcommands."
- `((listen . "127.0.0.1:8080")
- (state-directory . "/var/lib/tissue")
- ;; Assume current repository as default. If there is no current
- ;; repository, do not configure any hosts.
- (hosts . ,(guard (c ((let ((git-error (condition-git-error c)))
- (and git-error
- (= (git-error-code git-error)
- GIT_ENOTFOUND)))
- '()))
- `(("localhost"
- (upstream-repository . ,(git-top-level))))))))
+ (if (file-exists? %default-config-file)
+ (call-with-input-file %default-config-file
+ read)
+ `((listen . "127.0.0.1:8080")
+ (state-directory . "/var/lib/tissue")
+ ;; Assume current repository as default. If there is no current
+ ;; repository, do not configure any hosts.
+ (hosts . ,(guard (c ((let ((git-error (condition-git-error c)))
+ (and git-error
+ (= (git-error-code git-error)
+ GIT_ENOTFOUND)))
+ '()))
+ `(("localhost"
+ (upstream-repository . ,(git-top-level)))))))))
(define tissue-run-web
(match-lambda*