preserve directory-naming behavior of `raco pollen clone`

pull/58/head
Matthew Butterick 9 years ago
parent 70b1008caa
commit d07db3750c

@ -61,10 +61,10 @@ publish [dir] [dest] copy project in dir to dest without source files
(start-server)))))
(define (handle-publish directory rest-args)
(define (handle-publish directory rest-args arg-command-name)
(define target-path (or
(and rest-args (not (null? rest-args)) (path->complete-path (string->path (car rest-args))))
(build-path (find-system-path 'desk-dir) (string->path world:publish-directory-name))))
(build-path (find-system-path 'desk-dir) (string->path (if (equal? arg-command-name "clone") "clone" world:publish-directory-name)))))
`(begin
(require racket/file pollen/file racket/list)

@ -35,7 +35,7 @@
[(#f "help") (handle-help)]
[("start") (handle-start (path->directory-path first-arg-or-current-dir) port-arg)]
[("render") (handle-render (cons first-arg-or-current-dir (map very-nice-path (cdr (vector->list (current-command-line-arguments))))))]
[("clone" "publish") (handle-publish first-arg-or-current-dir rest-args)]
[("clone" "publish") (handle-publish first-arg-or-current-dir rest-args arg-command-name)]
[else (handle-else arg-command-name)]))))
(module+ main

Loading…
Cancel
Save