The deployment process I use is a little complicated, so I have build a .sh script to handle it all for me. It’s all set up to just take the file path and it builds and deploys everything. The .sh runs perfectly fine starting #! /bin/bash perfectly fine if I execute it from the terminal. It does not work when I execute it from Sublime Text 2.
My build file looks like this:
{
"cmd": "./sublimeAntDeploy.sh", "$file"],
"shell": true,
"working_dir": "${project_path:${folder}}"
}
My .sh script lies in the project directory and appears to be found just fine because the errors I get are:
./sublimeAntDeploy.sh: line 4: dirname: command not found
./sublimeAntDeploy.sh: line 6: basename: command not found
./sublimeAntDeploy.sh: line 7: awk: command not found
./sublimeAntDeploy.sh: line 9: sed: command not found
./sublimeAntDeploy.sh: line 10: sed: command not found
./sublimeAntDeploy.sh: line 16: rm: command not found
./sublimeAntDeploy.sh: line 18: mkdir: command not found
I’m not sure what kind of shell it’s using when I tell it to execute my .sh with shell, but I figured it would be using bash. Does Sublime Text 2 not execute using my /bin/bash or my normal PATH of commands? Although, I can’t imagine which PATH would not include mkdir or rm.