Hello!

Short: It works, but is not perfect.

(this may need an windows expert to make it better)

After seeing a script for Scala using something shebang like for a
windows system:

------------------------scalascript.cmd------------
::#!
@echo off
call scala -savecompiled %0 %*
goto :eof
::!#
println("I didn't believe this.")

argv.toList foreach Console.println
------------------------end--------------------------------

I tried this for Clojure. It seems that the Scala people did some
special handling for this case, in order to let Scala ignore the lines
from ::# to ::#. For Clojure I had to do this somehow manually.

---------------------clojurescript.cmd-------------

::#!
@echo off
REM (comment
call java -jar clojure.jar -e "(ns script (:require [clojure.core]))
(do (def echo (ref nil)) (def off nil) (def goto nil) (def REM
nil) :starting)" %0 %*
REM )
goto :eof
::!#

(println "\nI still would like to make this easier.")

---------------------end---------------------------------

Output is:

D:\lang\clojure>testscript.cmd
:starting

I still would like to make this easier.

D:\lang\clojure>


I actually dont completely understand whats happening. Any hints
appreciated.

Kind regards, alux

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to