diff options
| author | ruki <[email protected]> | 2024-07-15 22:55:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-07-15 12:21:42 +0800 |
| commit | 729a9c2602a64f4d2fa5151355e8c63ff1a326ab (patch) | |
| tree | 3893248b1514e0228ebbb96fa41844d675d149d7 /xmake/modules/target/action | |
| parent | d151aaa50441d159a2980ceefc55f1db45f4d9b0 (diff) | |
improve batchcmds
Diffstat (limited to 'xmake/modules/target/action')
| -rw-r--r-- | xmake/modules/target/action/install/main.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua index 5a0bec7ab..b78c8bb54 100644 --- a/xmake/modules/target/action/install/main.lua +++ b/xmake/modules/target/action/install/main.lua @@ -49,16 +49,16 @@ function _get_target_package_libfiles(target, opt) end -- copy file with symlinks -function _copyfile_with_symlinks(srcfile, outputdir) +function _copy_file_with_symlinks(srcfile, outputdir) if os.islink(srcfile) then local srcfile_symlink = os.readlink(srcfile) if not path.is_absolute(srcfile_symlink) then srcfile_symlink = path.join(path.directory(srcfile), srcfile_symlink) end - _copyfile_with_symlinks(srcfile_symlink, outputdir) - os.vcp(srcfile, outputdir, {symlink = true, force = true}) + _copy_file_with_symlinks(srcfile_symlink, outputdir) + os.vcp(srcfile, path.join(outputdir, path.filename(srcfile)), {symlink = true, force = true}) else - os.vcp(srcfile, outputdir) + os.vcp(srcfile, path.join(outputdir, path.filename(srcfile))) end end @@ -121,7 +121,7 @@ function _install_shared_libraries(target, opt) if os.isfile(filepath) and hash.sha256(filepath) ~= hash.sha256(libfile) then wprint("'%s' already exists in install dir, we are copying '%s' to overwrite it.", filepath, libfile) end - _copyfile_with_symlinks(libfile, bindir) + _copy_file_with_symlinks(libfile, bindir) end end @@ -152,7 +152,7 @@ function _install_shared(target, opt) end else -- install target with soname and symlink - _copyfile_with_symlinks(targetfile, bindir) + _copy_file_with_symlinks(targetfile, bindir) end os.trycp(target:symbolfile(), path.join(bindir, path.filename(target:symbolfile()))) |
