From 9859451198ce206a88ea45b3174172a991f90888 Mon Sep 17 00:00:00 2001 From: Correl Date: Thu, 21 Jan 2021 19:21:46 -0500 Subject: [PATCH] [provisioning] update recipes --- recipes/emacs-doom | 2 +- recipes/japanese | 1 - recipes/kubernetes | 1 - recipes/python | 20 +++++++++++++------- recipes/shell-utils | 4 ++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/recipes/emacs-doom b/recipes/emacs-doom index bbbab98..556e26a 100644 --- a/recipes/emacs-doom +++ b/recipes/emacs-doom @@ -16,4 +16,4 @@ if ! [ -d ${HOME}/.doom.d ]; then _run "[emacs-doom] Install .doom.d" ln -s ${HOME}/dotfiles/.doom.d ${HOME}/.doom.d fi -_run "[emacs-doom] Refreshing" $HOME/.emacs.d/bin/doom refresh +_run "[emacs-doom] Refreshing" $HOME/.emacs.d/bin/doom sync diff --git a/recipes/japanese b/recipes/japanese index 10f78f5..e9bcd21 100644 --- a/recipes/japanese +++ b/recipes/japanese @@ -5,7 +5,6 @@ set -e case $_PLATFORM in darwin) _recipe brew - _brew kakasi _brew cmigemo ;; linux) diff --git a/recipes/kubernetes b/recipes/kubernetes index 1075036..b9eeadf 100644 --- a/recipes/kubernetes +++ b/recipes/kubernetes @@ -8,7 +8,6 @@ case $_PLATFORM in darwin) _brew kubernetes-cli _brew kubernetes-helm - _brew_cask minikube _brew stern ;; esac diff --git a/recipes/python b/recipes/python index 71dc970..6459a33 100644 --- a/recipes/python +++ b/recipes/python @@ -2,7 +2,7 @@ # Description: The Python programming language set -e -__PYTHON_VERSION=3.8.2 +__PYTHON_VERSION=3.9.1 _recipe _path _recipe git @@ -12,7 +12,16 @@ function _pip { if ! pip show $pkg >/dev/null 2>&1; then _run "[pip] Install $pkg" pip install $pkg else - echo "[pip] $pkg is already installed, skiping." + echo "[pip] $pkg is already installed, skipping." + fi +} + +function _pyenv { + local version=$1 + if ! pyenv versions --bare | grep -q "^$version$"; then + _run "[pyenv] Install Python $version" pyenv install $version + else + echo "[pyenv] Python $version is already installed, skipping." fi } @@ -42,8 +51,5 @@ _profile 'eval "$(pyenv init -)"' _profile 'eval "$(pyenv virtualenv-init -)"' _profile 'pyenv global $(pyenv versions --bare --skip-aliases | egrep "^(\.?[[:digit:]]+)+$" | sort -rV)' - -if ! [ -d ~/.pyenv/versions/${__PYTHON_VERSION} ]; then - _run "[pyenv] Install python ${__PYTHON_VERSION}" pyenv install ${__PYTHON_VERSION} -fi -pyenv global ${__PYTHON_VERSION} +_pyenv $__PYTHON_VERSION +pyenv global $(pyenv versions --bare --skip-aliases | egrep "^(\.?[[:digit:]]+)+$" | sort -rV) diff --git a/recipes/shell-utils b/recipes/shell-utils index 4d73736..e28344f 100644 --- a/recipes/shell-utils +++ b/recipes/shell-utils @@ -23,7 +23,6 @@ case $_PLATFORM in # File compression _brew p7zip - _brew unrar # Misc _brew entr @@ -31,6 +30,7 @@ case $_PLATFORM in _brew htop _brew jq _brew lnav + _brew ripgrep _brew the_silver_searcher _brew tig _brew tmux @@ -52,7 +52,6 @@ case $_PLATFORM in # File compression _apt p7zip - _apt unrar # Misc _apt entr @@ -60,6 +59,7 @@ case $_PLATFORM in _apt htop _apt jq _apt lnav + _apt ripgrep _apt silversearcher-ag _apt tig _apt tmux