Skip to content

Instantly share code, notes, and snippets.

@boronine
Created May 11, 2012 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boronine/2660083 to your computer and use it in GitHub Desktop.
Save boronine/2660083 to your computer and use it in GitHub Desktop.
Run a list of commands (as strings) synchronously one after the other. Useful for Cakefiles
# Execute a list of commands one by one
run_all = (commands) ->
return if commands.length is 0
exec commands[0], (err, stdout, stderr) ->
console.log stdout + stderr
throw err if err
run_all commands.splice(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment