Adding run script stuff

This commit is contained in:
underscorediscovery
2013-07-12 21:32:37 -02:30
parent f6d0504ab8
commit 88dbe472fc
3 changed files with 30 additions and 0 deletions

BIN
run.n vendored Normal file

Binary file not shown.

4
script/build.hxml Normal file
View File

@@ -0,0 +1,4 @@
-main RunScript
-neko ../run.n
-lib openfl-tools
-cp src

26
script/src/RunScript.hx Normal file
View File

@@ -0,0 +1,26 @@
import haxe.io.Eof;
import haxe.Http;
import haxe.io.Path;
import haxe.Json;
import neko.Lib;
import sys.io.File;
import sys.io.Process;
import sys.FileSystem;
class RunScript {
public static function main() {
//take all args and forward them to build tools
var args = Sys.args();
//get the current folder
var cwd = args[args.length-1];
//remove it from the used args
args = args.splice(0,args.length-1);
//make a full command line
var full_args = [ "run", "openfl-tools" ].concat(args);
//enforce the folder to the current on
Sys.setCwd(cwd);
//and then execute
Sys.command("haxelib", full_args);
}
}