Drop rbenv and nodenv in favor of mise

Spelling
This commit is contained in:
David Heinemeier Hansson
2024-06-07 20:46:31 +02:00
parent df186620f7
commit c73f9c589b
5 changed files with 8 additions and 37 deletions

View File

@@ -1,4 +1,3 @@
eval "$(rbenv init - bash)"
eval "$(nodenv init -)"
eval "$(mise activate bash)"
eval "$(zoxide init bash)"
source /usr/share/doc/fzf/examples/key-bindings.bash

View File

@@ -8,7 +8,7 @@ HISTFILESIZE="${HISTSIZE}"
source /usr/share/bash-completion/bash_completion
# Set complete path
export PATH="./bin:$HOME/.local/bin:$HOME/.local/share/omakub/bin:$HOME/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
export PATH="./bin:$HOME/.local/bin:$HOME/.local/share/omakub/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
set +h
export OMAKUB_PATH="/home/$USER/.local/share/omakub"

6
install/mies.sh Normal file
View File

@@ -0,0 +1,6 @@
# Install mise for managing multiple versions of languages. See https://mise.jdx.dev/
curl https://mise.run | sh
# Install developer setups
mise use --global ruby@latest
mise use --global node@latest

View File

@@ -1,16 +0,0 @@
if ! command -v nodenv &>/dev/null; then
URL="https://nodejs.org/download/release/index.json"
DEFAULT_NODE_VERSION=$(curl -s "$URL" | jq -r '.[] | select(.lts != false) | .version' | head -n 1)
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
sudo ln -vs ~/.nodenv/bin/nodenv /usr/local/bin/nodenv
cd ~/.nodenv
src/configure && make -C src || true
cd ~/
mkdir -p "$(nodenv root)"/plugins
git clone https://github.com/nodenv/node-build.git "$(nodenv root)"/plugins/node-build
git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases
nodenv install $DEFAULT_NODE_VERSION
nodenv global $DEFAULT_NODE_VERSION
sudo ln -vs $(nodenv root)/shims/* /usr/local/bin/
fi

View File

@@ -1,18 +0,0 @@
# FIXME: Change to use whatever latest release is
DEFAULT_RUBY_VERSION="3.3.1"
sudo apt install -y rbenv
RUBY_BUILD_DIR="$(rbenv root)/plugins/ruby-build"
# Check if the directory exists
if [ -d "$RUBY_BUILD_DIR" ]; then
cd "$RUBY_BUILD_DIR" && git pull
cd -
else
git clone https://github.com/rbenv/ruby-build.git "$RUBY_BUILD_DIR"
fi
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
rbenv install $DEFAULT_RUBY_VERSION
rbenv global $DEFAULT_RUBY_VERSION