Skip to content

Commit

Permalink
#232: updated for Package Manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kray-G committed Jul 12, 2021
1 parent 34202c2 commit 3072945
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/std/pkg/Develop.kx
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ class DevelopPackageUpdater(pkgname, version) {

public dircopy(file1, file2) {
if (File.isDirectory(file1)) {
if (file1 == "dev") {
file2 = file2.parentPath() / "bin";
}
System.println("Copying a directory : ", file1);
if (!File.exists(file2)) {
File.mkdir(file2);
Expand Down Expand Up @@ -84,7 +81,7 @@ class DevelopPackageUpdater(pkgname, version) {
if (File.exists(root_ / "bin")) {
candidates = [];
Directory.walk(root_ / "bin") { &(f)
if (f.extension() == ".kx" && f.stem().endsWith("-dev")) {
if (f.extension() == ".kx") {
candidates.push(f.filename());
}
};
Expand All @@ -97,7 +94,7 @@ class DevelopPackageUpdater(pkgname, version) {
if (candidates_.isDefined) {
var exe = File.exists($kinxpath / "kxrepl.exe");
candidates_.each {
var dst = $kinxpath / _1.stem() + (exe ? ".exe" : "");
var dst = $kinxpath / _1.stem() + "-dev" + (exe ? ".exe" : "");
if (File.exists(dst) && removeFile(dst)) {
System.println("Removed an executable of %{dst.filename().bold().yellow()}");
}
Expand All @@ -119,7 +116,7 @@ class DevelopPackageUpdater(pkgname, version) {
var exe = exefile.extension() == ".exe";
if (File.exists(src)) {
candidates_.each {
var dst = $kinxpath / _1.stem() + (exe ? ".exe" : "");
var dst = $kinxpath / _1.stem() + "-dev" + (exe ? ".exe" : "");
if (File.exists(dst)) {
removeFile(dst);
}
Expand Down

0 comments on commit 3072945

Please sign in to comment.