use javascript instead of bash.

windows don't have bash commands.
so switch to javascript.