Make config file required
scripts/gitile.in
30 | 30 | (define* (main #:optional (args (command-line))) | |
31 | 31 | (let ((config | |
32 | 32 | (match args | |
33 | - | ((_) (make-config 8080 "localhost" "/var/lib/gitile/gitile-db.sql" | |
34 | - | "/var/lib/gitolite/repositories" "//" "Index" '() '())) | |
35 | 33 | ((_ "-c" file) | |
36 | 34 | (let ((content (call-with-input-file file read))) | |
37 | 35 | (match content | |
38 | - | (('config ('port port) ('host host) ('database database) | |
39 | - | ('repositories repositories) ('base-git-url git-base-url) | |
40 | - | ('index-title index-title) ('intro intro) ('footer footer)) | |
41 | - | (make-config port host database repositories git-base-url index-title | |
42 | - | intro footer))))) | |
43 | - | (_ (format #t "Usage: ~a [-c config-file]~%" (car args)))))) | |
36 | + | (('config ('port port) | |
37 | + | ('host host) | |
38 | + | ('database database) | |
39 | + | ('repositories repositories) | |
40 | + | ('base-git-url git-base-url) | |
41 | + | ('index-title index-title) | |
42 | + | ('intro intro) | |
43 | + | ('footer footer)) | |
44 | + | (make-config port host database repositories | |
45 | + | git-base-url index-title intro footer))))) | |
46 | + | (_ (format #t "Usage: ~a -c config-file~%" (car args)) | |
47 | + | (exit))))) | |
44 | 48 | (set-owner-validation! #f) | |
45 | 49 | (set-parameters-from-config! config) | |
46 | - | (run-server (gitile-handler config) | |
47 | - | #:port (config-port config)))) | |
50 | + | (run-server (gitile-handler config) #:port (config-port config)))) | |
48 | 51 | ||
49 | 52 | ;; Local Variables: | |
50 | 53 | ;; mode: scheme |