(module common racket
(require mzlib/etc)
(require racket/system)
(let ((text #<<EOT
BystroTeX setup
===============
We have a sample slide presentation, which you can use as a template for preparing your own talk.
The question is, where should we put it?
The default location will be ~/bystro
If you want to enter another location, please type the ABSOLUTE path
and press ENTER (on Linux you can use ~ for your home directory).
Or, if the default location is OK, then just press ENTER:
EOT
)) (display text))
(let* ((userinput (read-line))
(sampledir
(if ((string-length userinput) . > . 0)
(path->string (expand-user-path (string->path userinput)))
(path->string (expand-user-path (string->path "~/bystro"))))))
(unless (directory-exists? (string->path sampledir))
(make-directory (string->path sampledir)))
(system (string-append
"cp -a "
(path->string (this-expression-source-directory))
"/example-slides/* "
sampledir
"/")))
)