|
|
|
#!/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!
|
|
|
|
|
|
|
|
|
|
|
|
# ------------------- NodeJS Ecosystem -------------------
|
|
|
|
|
|
|
|
if [ -d $NVM_DIR ]; then
|
|
|
|
source $NVM_DIR/nvm.sh
|
|
|
|
source $NVM_DIR/bash_completion
|
|
|
|
fi
|
|
|
|
|
|
|
|
set_node_to() {
|
|
|
|
if check_exists nvm; then
|
|
|
|
nvm install $1
|
|
|
|
nvm alias default $1
|
|
|
|
nvm use default
|
|
|
|
else
|
|
|
|
echo "nvm not available, something went wrong..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_nvm() {
|
|
|
|
echo -e "${BOLD}Installing Node Version Manager${RESET}"
|
|
|
|
if [ -n $NVM_DIR ]; then
|
|
|
|
echo "nvm already installed! skipping"
|
|
|
|
else
|
|
|
|
chmod +x scripts/nvm_install.sh
|
|
|
|
scripts/nvm_install.sh &> /dev/null
|
|
|
|
|
|
|
|
remember "NVM_DIR=$HOME/.nvm"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
IRON=1
|