summaryrefslogtreecommitdiff
path: root/xmake/plugins/pack/batchcmds.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-24 22:39:32 +0800
committerruki <[email protected]>2023-11-24 22:39:32 +0800
commitce57069b6de7abaa758f791e29f89fa5dec34448 (patch)
tree7a20888a6fa82b7f02056c4661f3b9c4bc4fcdb7 /xmake/plugins/pack/batchcmds.lua
parentf99a2826a56540608b01075a072eba11f4da6fc5 (diff)
improve batchcmds
Diffstat (limited to 'xmake/plugins/pack/batchcmds.lua')
-rw-r--r--xmake/plugins/pack/batchcmds.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua
index 1b3023283..af55cc707 100644
--- a/xmake/plugins/pack/batchcmds.lua
+++ b/xmake/plugins/pack/batchcmds.lua
@@ -363,6 +363,9 @@ end
-- on install command
function _on_installcmd(package, batchcmds_)
+ if not package:from_binary() then
+ return
+ end
local srcfiles, dstfiles = package:installfiles()
for idx, srcfile in ipairs(srcfiles) do
batchcmds_:cp(srcfile, dstfiles[idx])
@@ -374,6 +377,9 @@ end
-- on uninstall command
function _on_uninstallcmd(package, batchcmds_)
+ if not package:from_binary() then
+ return
+ end
local _, dstfiles = package:installfiles()
for _, dstfile in ipairs(dstfiles) do
batchcmds_:rm(dstfile, {emptydirs = true})