-
Notifications
You must be signed in to change notification settings - Fork 0
/
MakeHaxelib.hx
39 lines (32 loc) · 927 Bytes
/
MakeHaxelib.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import sys.FileSystem;
class MakeHaxelib
{
static function mkdir(dirName:String)
{
FileSystem.createDirectory(dirName);
}
static function copyRecurse(src:String, dest:String)
{
if ( FileSystem.isDirectory(src) )
{
mkdir(dest);
for(file in FileSystem.readDirectory(src))
{
if (file.substr(0,1)=="." || file=="modules" ||file=="bin"||file=="lib"||file=="protobux"||file=="obj"||
file=="testing" || file=="testdata" )
continue;
copyRecurse(src+"/"+file, dest+"/"+file);
}
}
else
{
sys.io.File.copy(src, dest);
}
}
public static function main()
{
var dest = "protobux";
copyRecurse(".",dest);
copyRecurse("modules/protobuf/src/google/protobuf",dest+"/"+"modules/protobuf/src/google/protobuf");
}
}