On Sun, Nov 22, 2009 at 01:05:43AM -0800, bOR_ wrote:

>elif [ ${1: -4} = ".clj" ]; then
>    # Small hack to use lein to start clojure scripts
>    java -cp "$CLASSPATH" clojure.main "$1"

How about
    elif [ ${1: -4} = ".clj" ]; then
        # Small hack to use lein to start clojure scripts
        java -cp "$CLASSPATH" clojure.main "$@"

So you can even pass arguments to the script.

BTW, the leiningen.core invocation at the end should also be "$@" so
that arguments with spaces don't get expanded into multiple arguments.

If you add arguments to the 'repl' case, then you can run scripts
using that as well.

David

-- 
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