I write a lot of automation scripts too. Those scripts require maintenance since you will be using them more than once. I have used a lot of languages to code these scripts - Perl, Python, Ruby, PHP, bash and more. And if they have any GUI part, Tcl/Tk or PyGTK or something like that.
To run JS files, the 'custom_rhino' by Dojo is the easiest solution.
java -jar /usr/share/java/rhino.jar test.js
I created an alias for this command - so in my system this will be enough...
I still have not made any scripts using it - but I am searching for an excuse to take it for a spin.
- List of ECMAScript engines