how to use gvm in shell script

classic Classic list List threaded Threaded
4 messages Options
mfp
Reply | Threaded
Open this post in threaded view
|

how to use gvm in shell script

mfp
We are using Jenkins for building grails applications. Now, we would like to use it for builiding different projects based on different grails versions. But after we invoke gvm command in shell script. There is always error said: "could not found the command". Checked several articules, we know gvm is a function. Is there anyone knows how can we use it in a shell script for automatically building?

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: how to use gvm in shell script

marco.vermeulen
Administrator
Sounds like you need to source the gvm-init.sh file before you invoke the command:
source ~/.gvm/bin/gvm-init.sh
Hope that works.
---
Marco Vermeulen
Reply | Threaded
Open this post in threaded view
|

Re: how to use gvm in shell script

pledbrook
Not sure if this is what Marco meant, but you need to source the gvm-init.sh script from your own script. Otherwise you don't have access to the functions because they are not inherited by sub-shells (which is what your own script runs in).

Peter
Reply | Threaded
Open this post in threaded view
|

Re: how to use gvm in shell script

Yogev
In reply to this post by marco.vermeulen
You are the man :)