Conor Cosnett
Conor Cosnett

Reputation: 1306

How to activate a bash script with a sublime text build system in os x?

I want to execute this simple bash script with a JSON BUILD SYSTEM in Sublime Text.

#!/bin/bash

open -a Google\ Chrome ~/website/frontpage.html 
open -a Sublime\ Text ~/website/javascript.js

This sublime text build system does not activate the script above. How do I get it do run simplebashscript.sh (the script above)?

//build system
{

 "cmd": ["bash", "-c", "sh ~/simplebashscript.sh"]

}

Upvotes: 1

Views: 3447

Answers (1)

Conor Cosnett
Conor Cosnett

Reputation: 1306

This solution works on os x.

{
    "cmd"       : ["sh ~/simplebashscript.sh"],
    "selector"  : "source.shell",
    "shell":"bash"
}

Upvotes: 1

Related Questions