From ce57069b6de7abaa758f791e29f89fa5dec34448 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 24 Nov 2023 22:39:32 +0800 Subject: improve batchcmds --- xmake/plugins/pack/batchcmds.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmake/plugins/pack/batchcmds.lua') 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}) -- cgit v1.3.1