I've put together a utility script in groovy and would like to run it in any directory as needed without having to specify full path to it. As in $> groovy myScript.groovy
I've added the path to it's parent directory to PATH in .profile, sourced it, but keep gettig 'command not found' error. Any idea where to look for the problem, conceptually speaking?
Where things are:
First line of my PostBuilder.groovy script: #!/usr/bin/env groovy`
PATH in .profile: export PATH=$PATH:/home/me/work/web/MyProject/public_html
The error I'm getting now trying to execute the script in my home directory:
Caught: java.io.FileNotFoundException: /home/me/PostBuilder.groovy (/home/me/PostBuilder.groovy)
FYI, my Groovy/Grails set up works just fine so I'm thinking installation of groovy itself is ok.