aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-06-20 11:01:20 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-06-20 11:01:20 -0400
commita7a569ce5f6d6d0c48a43b766a283beec7fa2f02 (patch)
tree7c5209a76badd5825a8d876f592b4bde6bcaf732 /build.sh
parentdade9f4849438cf1a62db6ac273934872083c233 (diff)
downloadlite-xl-plugin-manager-a7a569ce5f6d6d0c48a43b766a283beec7fa2f02.tar.gz
lite-xl-plugin-manager-a7a569ce5f6d6d0c48a43b766a283beec7fa2f02.zip
Removed xxd as a dependnecy.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 94e514e..43343d6 100755
--- a/build.sh
+++ b/build.sh
@@ -39,8 +39,7 @@ fi
# Build the pre-packaged lua file into the executbale.
if [[ "$@" == *"-DLPM_STATIC"* ]]; then
[[ ! -e "lua.exe" ]] && gcc -Ilib/lua -o lua.exe lib/lua/onelua.c -lm
- ./lua.exe -e 'io.open("src/lpm.luac", "wb"):write(string.dump(assert(loadfile("src/lpm.lua"))))'
- xxd -i src/lpm.luac > src/lpm.lua.c
+ ./lua.exe -e 'f = string.dump(assert(loadfile("src/lpm.lua"))) io.open("src/lpm.lua.c", "wb"):write("unsigned char lpm_luac[] = \"" .. f:gsub(".", function (c) return string.format("\\x%02X",string.byte(c)) end) .. "\";unsigned int lpm_luac_len = " .. #f .. ";")'
fi
[[ $OSTYPE != 'msys'* && $CC != *'mingw'* && $CC != "emcc" ]] && CFLAGS="$CFLAGS -DLUA_USE_LINUX" && LDFLAGS="$LDFLAGS -ldl"