update starship install
This commit is contained in:
parent
ad80f22674
commit
4ab350e8fe
@ -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}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user