Add rvm support and ruby package
parent
ea86367332
commit
fb8e9ac54d
@ -0,0 +1,7 @@
|
||||
# shellcheck shell=bash
|
||||
if [[ -d "${HOME}/.rvm/bin" ]]; then
|
||||
# shellcheck disable=SC2076
|
||||
if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
fi
|
||||
fi
|
@ -0,0 +1,15 @@
|
||||
# shellcheck shell=sh
|
||||
if [ -d "${HOME}/.rvm/bin" ]; then
|
||||
case "${PATH}" in
|
||||
*"$HOME/.rvm/bin"*) ;;
|
||||
*) export PATH="$PATH:$HOME/.rvm/bin" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$(ps -p $$ -ocomm=)" = sh ]; then
|
||||
if [ -f "$HOME/.rvm/scripts/rvm" ]; then
|
||||
# Load RVM into a shell session *as a function*
|
||||
# shellcheck disable=SC1091
|
||||
. "$HOME/.rvm/scripts/rvm"
|
||||
fi
|
||||
fi
|
@ -0,0 +1,5 @@
|
||||
if [[ -d "${HOME}/.rvm/bin" ]]; then
|
||||
if [[ ! "${PATH}" =~ "${HOME}/.rvm/bin" ]]; then
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
fi
|
||||
fi
|
@ -0,0 +1,29 @@
|
||||
#!/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}"
|
Loading…
Reference in New Issue