diff options
| author | ruki <[email protected]> | 2023-11-24 00:49:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-11-24 00:49:00 +0800 |
| commit | e680f0fbac744bce8488af3479c14d835705176d (patch) | |
| tree | f8a01976b6f384c0c875cc86f5af8d693da57893 /xmake/plugins/pack/runself/main.lua | |
| parent | 4725c68c0ea12f684646c6cba4844c189051ae4a (diff) | |
add makeself setup
Diffstat (limited to 'xmake/plugins/pack/runself/main.lua')
| -rw-r--r-- | xmake/plugins/pack/runself/main.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xmake/plugins/pack/runself/main.lua b/xmake/plugins/pack/runself/main.lua index b45b20e33..f8a646427 100644 --- a/xmake/plugins/pack/runself/main.lua +++ b/xmake/plugins/pack/runself/main.lua @@ -86,13 +86,14 @@ function _pack_runself(makeself, package) return value end) - local archivedir = package:buildir() - local setupfile = path.join(package:buildir(), "setup.sh") - io.writefile(setupfile, [[#!/bin/bash - echo hello]]) + -- install the setup.sh script + local installdir = package:installdir() + local setupfile = path.join(installdir, "__setup__.sh") + os.cp(path.join(os.programdir(), "scripts", "xpack", "runself", "setup.sh"), setupfile) -- make package - os.vrunv(makeself, {"--gzip", "--sha256", "--lsm", specfile, archivedir, package:outputfile(), "setup.sh", "hello"}) + os.vrunv(makeself, {"--gzip", "--sha256", "--lsm", specfile, + installdir, package:outputfile(), package:basename(), "./__setup__.sh"}) end function main(package) |
