From 4ab350e8fe1ed7e1e6a5f4dbae2e927c322adb50 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Mon, 19 Jul 2021 01:23:00 -0700 Subject: [PATCH] update starship install --- starship/.local/bin/install-starship-home | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/starship/.local/bin/install-starship-home b/starship/.local/bin/install-starship-home index 2ff75ee..0f2c19d 100755 --- a/starship/.local/bin/install-starship-home +++ b/starship/.local/bin/install-starship-home @@ -10,22 +10,11 @@ function get_os () { esac } -function get_arch () { - case $(uname -m) in - x86_64*) echo x86_64;; - *) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;; - esac -} - APP=starship -VERSION=${VERSION:-0.54.0} +VERSION=${VERSION:-0.56.0} DEST="${XDG_DATA_HOME}/apps/releases/${APP}" -URL="https://github.com/starship/starship/releases/download/v${VERSION}/starship-$(get_arch)-$(get_os).tar.gz" +URL=https://github.com/starship/starship/releases/download/v${VERSION}/starship-$(uname -m)-$(get_os).tar.gz extract_tarball "${URL}" "${DEST}/${VERSION}" set_current_link "${DEST}" "${VERSION}" - -cd "$XDG_BIN_HOME" || exit 1 -unlink_if_set "$XDG_BIN_HOME/${APP}" -ln -s "$(relative_path "${XDG_BIN_HOME}" "${DEST}/current/${APP}")" ${APP} -cd - >/dev/null || exit 1 +set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"