Compare commits
No commits in common. "f1a2d0292c19163e1f0be4d1d00d52eaac1d1ff6" and "99f1a7f6e1784cf332d3a50d6fdbfbd6a94430be" have entirely different histories.
f1a2d0292c
...
99f1a7f6e1
@ -13,23 +13,12 @@ main() (
|
|||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/lua-language-server" "${DEST}" bin/lua-language-server
|
||||||
# lua-language-server locates main.lua next to its own argv[0], without
|
|
||||||
# resolving symlinks, so it can't be launched through a symlinked
|
|
||||||
# executable (only a symlinked directory in the path works). Use a
|
|
||||||
# wrapper script instead of set_link.
|
|
||||||
cat >"${XDG_BIN_HOME}/lua-language-server" <<EOF
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
exec "${DEST}/current/bin/lua-language-server" "\$@"
|
|
||||||
EOF
|
|
||||||
chmod +x "${XDG_BIN_HOME}/lua-language-server"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
get_arch() (
|
get_arch() (
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64*) echo x64 ;;
|
x86_64*) echo x64 ;;
|
||||||
arm64*) echo arm64 ;;
|
|
||||||
aarch64*) echo arm64 ;;
|
|
||||||
*)
|
*)
|
||||||
echo >&2 "unsupported architecture: $(uname -m)"
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -19,18 +19,8 @@ main() (
|
|||||||
get_arch () (
|
get_arch () (
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64*) echo x64 ;;
|
x86_64*) echo x64 ;;
|
||||||
arm64*) echo arm64 ;;
|
|
||||||
aarch64*) echo arm64 ;;
|
|
||||||
*) >&2 echo "unsupported uname: $(uname -m)"; exit 1 ;;
|
*) >&2 echo "unsupported uname: $(uname -m)"; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
)
|
)
|
||||||
|
|
||||||
get_os () (
|
|
||||||
case $(uname -s) in
|
|
||||||
Linux*) echo linux ;;
|
|
||||||
Darwin*) echo macos ;;
|
|
||||||
*) >&2 echo "unsupported os: $(uname -s)"; exit 1 ;;
|
|
||||||
esac
|
|
||||||
)
|
|
||||||
|
|
||||||
main "${@}"
|
main "${@}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user