slightly more robust way to build the paths

This commit is contained in:
Danny Yoo 2011-10-03 14:10:12 -04:00
parent 0eab74e2e0
commit a254acf05f

View File

@ -118,8 +118,10 @@
(let ([n 0])
(lambda ()
(define result (build-path (current-output-dir)
(string-append
(regexp-replace #rx"[.](rkt|ss)$"
(path->string (file-name-from-path f))
"")
(if (= n 0)
".js"
(format "_~a.js" n)))))
@ -162,13 +164,16 @@
"")]
[output-html-filename
(build-path
(regexp-replace #rx"[.](rkt|ss)$"
(string-append (regexp-replace #rx"[.](rkt|ss)$"
(path->string (file-name-from-path f))
"")
".html"))]
[output-manifest-filename
(build-path
(string-append
(regexp-replace #rx"[.](rkt|ss)$"
(path->string (file-name-from-path f))
"")
".appcache"))])
(unless (directory-exists? (current-output-dir))
(fprintf (current-report-port) "Creating destination directory ~s\n" (current-output-dir))