Created
May 11, 2012 14:31
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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