Skip to content

Commit 459c648

Browse files
committed
optimize d2x pkgindex repo, avoid install dir issue for new xlings version (auto .stamp)
1 parent ea49f0c commit 459c648

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

template.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ function installed()
2828
end
2929

3030
function install()
31-
local dest = d2x_projectdir()
32-
os.cp(projectdir, dest)
31+
os.cp(projectdir, pkginfo.install_dir())
3332
os.tryrm(projectdir)
33+
return true
34+
end
35+
36+
function config()
37+
local dest = d2x_projectdir()
38+
if os.isdir(dest) then
39+
log.warn("Course '%s' is already installed at '%s', skipping config", package.name, dest)
40+
return true
41+
end
42+
os.cp(pkginfo.install_dir(), dest)
3443
os.cd(dest)
3544
system.exec("xlings install")
3645
return true

0 commit comments

Comments
 (0)