Skip to content

Instantly share code, notes, and snippets.

@ryedin
Created June 18, 2010 03:59
Show Gist options
  • Save ryedin/443218 to your computer and use it in GitHub Desktop.
Save ryedin/443218 to your computer and use it in GitHub Desktop.
if(require.main == module){
if (system.args[2] === "-refresh") {
system.print("deleting " + exports.baseFilePath);
require("child_process").exec("rm -r " + exports.baseFilePath, function(err, stdout, stderr) {
if (err !== null) {
system.print("error deleting directory: " + err);
} else {
exports.useLocal().runAsMain(system.args[3]);
}
});
} else {
exports.useLocal().runAsMain(system.args[2]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment