You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
943 B
Bash
35 lines
943 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
|
|
function get_os () (
|
|
case $(uname -s) in
|
|
Linux*) echo linux;;
|
|
Darwin*) echo darwin;;
|
|
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
|
|
esac
|
|
)
|
|
|
|
function get_arch () (
|
|
case $(uname -m) in
|
|
x86_64) echo x64;;
|
|
arm64) echo arm64;;
|
|
aarch64) echo arm64;;
|
|
*) >&2 echo "unsupported arch: $(uname -m)"; exit 1;;
|
|
esac
|
|
)
|
|
|
|
APP=pulumi
|
|
VERSION=${VERSION:-3.52.1}
|
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
|
URL=https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-$(get_os)-$(get_arch).tar.gz
|
|
|
|
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1"
|
|
set_current_link "${DEST}" "${VERSION}"
|
|
|
|
for PULUMI_APP in $(find "${DEST}/${VERSION}" -type f -exec basename "{}" \; | sort); do
|
|
set_link "${XDG_BIN_HOME}/${PULUMI_APP}" "${DEST}" "${PULUMI_APP}"
|
|
done
|