Skip to content

Commit

Permalink
#232: updated kip.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kray-G committed May 21, 2021
1 parent cd46f5a commit e6a6328
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/exec/kip.kx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Kip.progress = _function(...args) {
Kip.progressln = _function(...args) {
System.println("[" + new DateTime().toString().bold().green() + "] ", ...args);
};
Kip.warningln = _function(...args) {
System.println("[" + new DateTime().toString().bold().yellow() + "] ", ...args);
};
Kip.errorln = _function(...args) {
System.println("[" + new DateTime().toString().bold().red() + "] ", ...args);
};
Expand Down Expand Up @@ -425,6 +428,10 @@ class KinxPackageLibraryManager(repoMgr_) {
}

public install(name, version) {
if (name.isUndefined) {
Kip.errorln("No package name specified");
return false;
}
var verlist;
var packages = repoMgr_.getPackageInfo();
if (packages && packages[name]) {
Expand Down Expand Up @@ -609,7 +616,15 @@ class KinxPackageLibraryManager(repoMgr_) {
}

public update(name) {
return install(name);
if (name) {
// Install the latest version of the package.
return install(name);
}
Kip.warningln("No name for update...");
Kip.warningln("Not implemented this feature yet");
Kip.warningln("TODO: - check if there are updates each package");
Kip.warningln("TODO: - update those if the package has an update");
return false;
}

}
Expand Down

0 comments on commit e6a6328

Please sign in to comment.