From ee94155df9de5727d57270fb3388635bc7d9858e Mon Sep 17 00:00:00 2001 From: Andrejus Date: Mon, 9 Jun 2025 22:42:26 +0100 Subject: [PATCH] fix: profile nvm dir, format, docs bump --- README.md | 10 +++------- files/home/.profile | 8 ++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 18b2386..4f70b1f 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,13 @@ to set up my development environment ## Usage -A local repository can be installed by running: +A local repository can be installed and updated by running: - ./script/install - -Once installed, updates can be applied by running: - - dots + ./install A specific script can be installed by running: - dots script1 script2 ... + ./install script1 script2 ... ### Automated setup diff --git a/files/home/.profile b/files/home/.profile index 8a05ea7..7f33ada 100644 --- a/files/home/.profile +++ b/files/home/.profile @@ -24,7 +24,7 @@ export DOTFILES=${DOTFILES:-"$HOME/.dotfiles"} # Initialise and load Node # ----------------------------------------------------------------- if [ -z "$NVM_DIR" ]; then - export NVM_DIR=${NVM_DIR:-"$HOME/.nvm"} + export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" mkdir -p "$NVM_DIR" fi @@ -36,7 +36,7 @@ _dots_load_nvm node_alias="$NVM_DIR/alias/lts/jod" if [ -f "$node_alias" ]; then - VERSION=`cat "$node_alias"` + VERSION=$(cat "$node_alias") node_bin_path="$NVM_DIR/versions/node/$VERSION/bin" if [[ ":$PATH:" != *":$node_bin_path:"* ]]; then export PATH="$node_bin_path:$PATH" @@ -51,7 +51,7 @@ if [[ ":$PATH:" != *":$PYENV_ROOT/bin:"* ]]; then export PATH="$PYENV_ROOT/bin:$PATH" fi _dots_load_pyenv() { - [ -x `command -v pyenv` ] && eval "$(pyenv init --path)" + [ -x $(command -v pyenv) ] && eval "$(pyenv init --path)" } _dots_load_pyenv @@ -63,7 +63,7 @@ fi # aliases # ----------------------------------------------------------------- if [ -f ~/.aliases ]; then - source ~/.aliases + source ~/.aliases fi # Load homebrew