For one-off scripts I typically have a `scripts/` directory in my projects.
I also have a scripts profile in my project.clj which includes "src/clj"
and "scripts", that way my scripts can call functions from my project. I
then have a bash script called `bin/script` which just contains "lein run
with-profile +scripts -m $@"

Now, say I have a script with namespace 'db.migrate' under
"scripts/db/migrate.clj", calling it is just a matter of doing `bin/scripts
db.migrate arg1 arg2 `.

HTH

On Thu, Jul 14, 2016 at 10:34 PM, Cecil Westerhof <cldwester...@gmail.com>
wrote:

> 2016-07-14 23:18 GMT+02:00 Gary Trakhman <gary.trakh...@gmail.com>:
>
>> Boot <https://github.com/boot-clj/boot/wiki/Scripts> and inlein
>> <http://inlein.org/> are both more suitable for one-off scripts.
>>
>
> ​OK, I will look into them.​
>
>
>
>> On Thu, Jul 14, 2016 at 5:16 PM Cecil Westerhof <cldwester...@gmail.com>
>> wrote:
>>
>>> In my project I have some functions I use when calling ‘lein repl’ in
>>> the project directory. Would it be possible to use just that function? So
>>> use lein to call this function and return?
>>>
>>> Maybe not very useful because of the time it takes to start the JVM, but
>>> I like to experiment. ;-)
>>>
>>
> --
> Cecil Westerhof
>
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to