Swap asdf with mise
This commit is contained in:
parent
4b8128a3af
commit
2693cdc545
10
.zshrc
10
.zshrc
@ -1,3 +1,5 @@
|
||||
mkdir -p "$HOME/.local/bin" && export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
oh_my_zsh="$HOME/.oh-my-zsh"
|
||||
|
||||
if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then
|
||||
@ -13,7 +15,6 @@ if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then
|
||||
git
|
||||
isodate
|
||||
urltools
|
||||
asdf
|
||||
)
|
||||
|
||||
if [[ $(command -v tmux) ]]; then
|
||||
@ -24,6 +25,11 @@ if [[ -f "$oh_my_zsh/oh-my-zsh.sh" ]]; then
|
||||
plugins+=(tmux)
|
||||
fi
|
||||
|
||||
if [[ $(command -v mise) ]]; then
|
||||
plugins+=(mise)
|
||||
eval "$(mise activate zsh)"
|
||||
fi
|
||||
|
||||
if [[ $(command -v fzf) ]]; then plugins+=(fzf); fi
|
||||
|
||||
if [[ $(command -v systemctl) ]]; then
|
||||
@ -70,8 +76,6 @@ if [[ $(command -v fzf) && $(command -v fd) ]]; then
|
||||
export FZF_DEFAULT_COMMAND="fd --type f --hidden --no-ignore --follow --exclude .git"
|
||||
fi
|
||||
|
||||
mkdir -p "$HOME/.local/bin" && export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
function weather() {
|
||||
local loc=$1
|
||||
if [[ -z "$loc" ]]; then
|
||||
|
36
install.sh
36
install.sh
@ -92,36 +92,9 @@ function install_oh_my_zsh() {
|
||||
git -C "$HOME" clone https://code.cotugno.family/kevin/ohmyzsh.git "$(basename "$oh_my_zsh_dir")"
|
||||
}
|
||||
|
||||
function install_asdf() {
|
||||
local asdf_dir="$HOME/.asdf"
|
||||
if [ -d "$asdf_dir" ]; then
|
||||
echo "asdf is already installed"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Installing asdf..."
|
||||
if [ "$OS" = "darwin" ]; then
|
||||
$install_package_cmd asdf
|
||||
. "/usr/local/opt/asdf/libexec/asdf.sh"
|
||||
else
|
||||
git -C "$HOME" clone https://code.cotugno.family/kevin/asdf.git "$(basename "$asdf_dir")"
|
||||
git -C "$asdf_dir" checkout "$(git -C "$asdf_dir" describe --tags --abbrev=0)"
|
||||
. "$asdf_dir/asdf.sh"
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_asdf() {
|
||||
local asdf_plugins=(ruby nodejs)
|
||||
|
||||
for plugin in ${asdf_plugins[@]}; do
|
||||
if [[ ! -d "$HOME/.asdf/plugins/$plugin" ]]; then
|
||||
echo "Installing asdf $plugin plugin"
|
||||
asdf plugin add "$plugin"
|
||||
asdf install "$plugin" latest
|
||||
else
|
||||
echo "asdf plugin $plugin already installed"
|
||||
fi
|
||||
done
|
||||
function install_mise() {
|
||||
curl https://mise.run | sh
|
||||
mise install
|
||||
}
|
||||
|
||||
function install_files() {
|
||||
@ -140,6 +113,5 @@ detect_os
|
||||
detect_package_manager
|
||||
install_git
|
||||
install_oh_my_zsh
|
||||
install_asdf
|
||||
setup_asdf
|
||||
install_mise
|
||||
install_files
|
||||
|
Loading…
Reference in New Issue
Block a user