Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The is-script argument to generate-file-with-expressions was only use…

…d to make the 'generate' script, which wasn't actually used. So this removes all that to simplify the code.
  • Loading branch information...
commit 4b03b330bdcc73b658a056d91e57edb8f7cc466c 1 parent ed804ec
@vegashacker authored
Showing with 1 addition and 14 deletions.
  1. +1 −14 generate-lib.scm
View
15 generate-lib.scm
@@ -52,7 +52,6 @@
(generate-file-with-expressions
#:dir-must-exist #t
(build-path project-path "serve.scm")
- #f
`(require ,(expr-for-lp-require "leftparen.scm")
"app.scm"
"main.scm")
@@ -69,7 +68,6 @@
(generate-file-with-expressions
#:dir-must-exist #t
(build-path project-path "app.scm")
- #f
(make-raw "#lang scheme/base\n")
`(require ,(expr-for-lp-require "leftparen.scm"))
(make-raw "")
@@ -81,7 +79,6 @@
(generate-file-with-expressions
#:dir-must-exist #t
(build-path project-path "main.scm")
- #f
(make-raw "#lang scheme/base\n")
`(require ,(expr-for-lp-require "leftparen.scm")
"app.scm")
@@ -94,7 +91,6 @@
(generate-file-with-expressions
#:dir-must-exist #t
(build-path project-path "settings-localhost.scm")
- #f
`(require ,(expr-for-lp-require "settings.scm"))
(make-raw "")
'(setting-set! *PORT* 8765)
@@ -110,28 +106,19 @@
;; script/server
(generate-file-with-expressions
(build-path project-path "script/server")
- #f
(make-raw "mzscheme -r serve.scm $1"))
- ;; script/generate
- (generate-file-with-expressions
- (build-path project-path "script/generate")
- #t
- `(require ,(expr-for-lp-require "generate-lib.scm"))
- `(generate-from-path "." (current-command-line-arguments)))
-
)
(define-struct raw (str))
-(define (generate-file-with-expressions path-to-file is-script
+(define (generate-file-with-expressions path-to-file
#:dir-must-exist (dir-must-exist #f)
. expressions)
(with-output-to-file-in-dir
#:must-previously-exist dir-must-exist
path-to-file
(lambda ()
- (when is-script (write-string "\":\"; exec mzscheme -r $0 \"$@\"\n"))
(for-each (lambda (e)
(if (raw? e) (write-string (raw-str e)) (write e))
(write-string "\n")) expressions)

0 comments on commit 4b03b33

Please sign in to comment.
Something went wrong with that request. Please try again.