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.
30 lines
777 B
Bash
30 lines
777 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
# shellcheck disable=SC1091
|
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
|
|
VERSION=${VERSION:-1.29.12}
|
|
APP=rvm-installer
|
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
|
URL=https://raw.githubusercontent.com/rvm/rvm/${VERSION}/binscripts/rvm-installer
|
|
|
|
RVM_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
|
|
|
# shellcheck disable=SC2086
|
|
gpg --recv-keys ${RVM_KEYS}
|
|
|
|
mkdir_if_missing "${DEST}/${VERSION}"
|
|
INSTALLER=${DEST}/${VERSION}/rvm-installer
|
|
|
|
if [[ ! -f "${INSTALLER}" ]]; then
|
|
curl --silent --location --output "${INSTALLER}" "${URL}"
|
|
chmod +x "${INSTALLER}"
|
|
fi
|
|
|
|
set_current_link "${DEST}" "${VERSION}"
|
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
|
|
"${INSTALLER}" "${VERSION}"
|