|
|
|
#!/bin/sh
|
|
|
|
# Bare Metal Alchemist, 2022
|
|
|
|
|
|
|
|
#############################################
|
|
|
|
# Iron - ♂ #
|
|
|
|
#############################################
|
|
|
|
|
|
|
|
# Iron is the most common element found on our planet, and an element
|
|
|
|
# that we, as a species, frequently rely on to build our tools and
|
|
|
|
# our society as a whole.
|
|
|
|
|
|
|
|
# This ingredient contains functions for building web applications and
|
|
|
|
# installing common frameworks. Expect to use this one a lot if you're
|
|
|
|
# writing alchemy recipes!
|
|
|
|
|
|
|
|
set_node_to() {
|
|
|
|
if check_exists nvm; then
|
|
|
|
nvm install v16.13.0
|
|
|
|
nvm alias default v16.13.0
|
|
|
|
nvm use default
|
|
|
|
else
|
|
|
|
echo "nvm not available, something went wrong..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_nvm() {
|
|
|
|
echo -e "${BOLD}Installing Node Version Manager${RESET}"
|
|
|
|
chmod +x scripts/nvm_install.sh
|
|
|
|
scripts/nvm_install.sh &> /dev/null
|
|
|
|
|
|
|
|
remember "NVM_DIR=$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
|
|
|
|
|
|
case $SHELL in
|
|
|
|
"/bin/zsh")
|
|
|
|
source ~/.zshrc
|
|
|
|
;;
|
|
|
|
"/bin/bashrc")
|
|
|
|
source ~/.bashrc
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
IRON=1
|