mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00

* feat: add shfmt Add support for shfmt * Handle multiple architectures Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
21 lines
439 B
Bash
21 lines
439 B
Bash
ver="$(latest_release mvdan/sh)"
|
|
|
|
arch="$(uname -m)"
|
|
case "${arch}" in
|
|
"x86_64")
|
|
arch="amd64"
|
|
;;
|
|
"i386")
|
|
arch="386"
|
|
;;
|
|
"aarch64")
|
|
arch="arm64"
|
|
;;
|
|
*)
|
|
echo >&2 "unsupported architecture: ${arch}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
wget "https://github.com/mvdan/sh/releases/download/${ver}/shfmt_${ver}_linux_${arch}" -O /usr/local/bin/shfmt
|
|
chmod +x /usr/local/bin/shfmt
|