diff --git a/.solo/logo.png b/.solo/logo.png new file mode 100644 index 0000000..a020b0f Binary files /dev/null and b/.solo/logo.png differ diff --git a/soloweb b/soloweb index 98741b6..1a21f9e 100755 --- a/soloweb +++ b/soloweb @@ -499,21 +499,17 @@ (define count-dirs (lambda (p) (length (filter (lambda (c) (equal? c "/")) (string->list p))))) -(define init (lambda (solo-path image) +(define init (lambda (solo-path) (is-solo? solo-path) (if (equal? (path-dir solo-path) (pwd)) (error-exit "soloweb error: the site cannot be generated in the same directory as the repository, as the folders will share a name")) (set! repo-dir solo-path) (set! c (conf solo-path)) (set! repo-name (path-base solo-path)) - (if (and image (path-exists? image)) - (begin - (set! logo-file (append "logo" (path-extension image))) - (cp image logo-file)) - (display-lines "No logo file was found, skipping")) (define new-base (path-join (pwd) repo-name)) (mkdir new-base 0755) + (chdir new-base) (display-lines "soloweb: archiving and compressing") (chdir (path-dir repo-dir)) @@ -523,6 +519,14 @@ (chdir new-base) (mkdir "files" 0755) + (define logo-list (path-glob (path-join repo-dir ".solo" "logo.*"))) + (if (not (null? logo-list)) + (begin + (set! logo-file (path-base (car logo-list))) + (cp (car logo-list) logo-file)) + (display-lines "No logo file was found, skipping")) + + (display-lines "soloweb: generating html") (make-history-html) (make-files-html) @@ -533,11 +537,9 @@ (set! sys-args (cdr sys-args)) (case (length sys-args) (0 (error-exit "No solo repo path was given")) - (1 (init (path-abs (car sys-args)) #f)) + (1 (init (path-abs (car sys-args)))) (else - (init - (path-abs (car sys-args)) - (path-abs (car (cdr sys-args)))))))) + (error-exit "Too many arguments. Expected only a path to a solo repo."))))) (main) ; vim: ts=2 sw=2 expandtab ft=slope