made global attribute functional
This commit is contained in:
@@ -20,8 +20,9 @@ class Update {
|
||||
for (libNode in libsXML.elements) {
|
||||
var lib:Library = {
|
||||
name: libNode.att.name,
|
||||
type: libNode.name
|
||||
type: libNode.name,
|
||||
};
|
||||
if (libNode.has.global) lib.global = libNode.att.global;
|
||||
switch (lib.type) {
|
||||
case "lib":
|
||||
if (libNode.has.version) lib.version = libNode.att.version;
|
||||
@@ -34,16 +35,17 @@ class Update {
|
||||
|
||||
for(lib in libs) {
|
||||
// install libs
|
||||
var globalism = lib.global == "true" ? "--global" : "";
|
||||
switch(lib.type) {
|
||||
case "lib":
|
||||
prettyPrint('Installing "${lib.name}"...');
|
||||
Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}');
|
||||
Sys.command('haxelib $globalism install ${lib.name} ${lib.version != null ? " " + lib.version : " "}');
|
||||
case "git":
|
||||
prettyPrint('Installing "${lib.name}" from git url "${lib.url}"');
|
||||
if (lib.ref != null)
|
||||
Sys.command('haxelib git ${lib.name} ${lib.url} ${lib.ref}');
|
||||
else
|
||||
Sys.command('haxelib git ${lib.name} ${lib.url}');
|
||||
if (lib.ref != null)
|
||||
Sys.command('haxelib $globalism git ${lib.name} ${lib.url} ${lib.ref}');
|
||||
else
|
||||
Sys.command('haxelib $globalism git ${lib.name} ${lib.url}');
|
||||
default:
|
||||
prettyPrint('Cannot resolve library of type "${lib.type}"');
|
||||
}
|
||||
@@ -90,7 +92,8 @@ class Update {
|
||||
typedef Library = {
|
||||
var name:String;
|
||||
var type:String;
|
||||
var ?global:String;
|
||||
var ?version:String;
|
||||
var ?ref:String;
|
||||
var ?url:String;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user