Update 3 files
- /home/.chezmoiscripts/_universal/run_onchange_before_09-ensure-node-version.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_09-ensure-node-version.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl
This commit is contained in:
parent
0da83c5ebb
commit
fe0adf7813
2 changed files with 14 additions and 4 deletions
|
@ -16,14 +16,26 @@ else
|
||||||
logg '`node` is available'
|
logg '`node` is available'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Ensure volta is installed
|
### Ensure Volta is installed
|
||||||
if ! command -v volta > /dev/null; then
|
if ! command -v volta > /dev/null; then
|
||||||
if command -v brew > /dev/null; then
|
if command -v brew > /dev/null; then
|
||||||
logg 'Installing `volta` via `brew`'
|
logg 'Installing `volta` via `brew`'
|
||||||
brew install volta
|
brew install volta
|
||||||
|
else
|
||||||
|
logg warn '`brew` needs to be available to install Volta'
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
if ! node --version > /dev/null; then
|
||||||
|
volta install node@latest
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Setup Volta
|
||||||
|
if command -v volta > /dev/null; then
|
||||||
if [ -z "$VOLTA_HOME" ]; then
|
if [ -z "$VOLTA_HOME" ]; then
|
||||||
volta setup
|
volta setup
|
||||||
|
else
|
||||||
|
logg warn 'VOLTA_HOME is not defined'
|
||||||
fi
|
fi
|
||||||
if [ -f "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
. "$HOME/.bashrc"
|
. "$HOME/.bashrc"
|
||||||
|
@ -34,9 +46,7 @@ if ! command -v volta > /dev/null; then
|
||||||
logg 'Installing `node` via `volta`'
|
logg 'Installing `node` via `volta`'
|
||||||
volta install node@latest
|
volta install node@latest
|
||||||
else
|
else
|
||||||
if ! node --version > /dev/null; then
|
logg warn '`volta` needs to be installed'
|
||||||
volta install node@latest
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### Ensure zx is installed
|
### Ensure zx is installed
|
||||||
|
|
Loading…
Reference in a new issue