On Sep 11, 8:32 am, "Paul Stadig" <[EMAIL PROTECTED]> wrote:
> I have a stupid idea as well (related to reader macros). Is there any
> way we can get the reader to not have problems with
> "#!/usr/bin/clojure" as the first line?
>
> This would allow simple and standard use of Clojure in a script file.
> Or perhaps a solution (other than mucking with the reader) is to have
> clojure.lang.Script ignore the first line if it is the shebang?
>
> I mean this is cool (in a really geeky way)
>
> #^:shebang '[
> exec java -cp "$HOME/src/clj/clojure/clojure.jar" clojure.lang.Script
> "$0" -- "$@"
> ]
>
> But its not standard, nor is it simple to remember, and if you have a
> bin script that does stuff like read a Clojure rc file, or set the
> classpath, or something you either lose that functionality, or you
> have to basically try to duplicate the bin script at the top of every
> clojure script. Additionally, if you want to hard code the path for
> security like so
>
> #^:shebang '[
> exec /usr/bin/java -cp "$HOME/src/clj/clojure/clojure.jar"
> clojure.lang.Script "$0" -- "$@"
> ]
>
> Clojure has issues with it.
>
I already voted, but I agree with this. Having a standard way to run
clojure scripts from a command line would be very useful.
Allen
--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---