diff --git a/dot_local/bin/executable_install-dust b/dot_local/bin/executable_install-dust index 15adacc..1752e00 100755 --- a/dot_local/bin/executable_install-dust +++ b/dot_local/bin/executable_install-dust @@ -10,7 +10,7 @@ VERSION=${VERSION:-1.2.6} DEST=${XDG_DATA_HOME}/apps/releases/${APP} main() ( - URL=https://github.com/bootandy/dust/releases/download/v${VERSION}/dust-v${VERSION}-$(uname -m)-$(get_os).tar.gz + URL=https://github.com/bootandy/dust/releases/download/v${VERSION}/dust-v${VERSION}-$(get_arch)-$(get_os).tar.gz extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-component 1" set_current_link "${DEST}" "${VERSION}" @@ -28,4 +28,18 @@ get_os() ( esac ) +# dust releases use Rust target triples, which differ from uname -m +get_arch() ( + case $(uname -m) in + x86_64*) echo x86_64 ;; + amd64*) echo x86_64 ;; + arm64*) echo aarch64 ;; + aarch64*) echo aarch64 ;; + *) + echo >&2 "unsupported architecture: $(uname -m)" + exit 1 + ;; + esac +) + main "${@}"