Skip to content

Commit

Permalink
Update where touch files are created
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Feb 21, 2024
1 parent c8c92bd commit 0a8c8f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/dependency_install_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,22 @@ install_gcs() {

install_nvm() {
# By default this will place NVM in $HOME/.nvm
if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.nvm_installed-${DATAFED_NVM_VERSION}" ]; then
# By setting NVM_DIR beforehand when the scirpt is run it
# will use it to set the install path
export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
mkdir -p "${NVM_DIR}"
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/${DATAFED_NVM_VERSION}/install.sh" | bash
# Mark nvm as installed
touch ".nvm_installed-${DATAFED_NVM_VERSION}"
touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.nvm_installed-${DATAFED_NVM_VERSION}"
else
export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
fi
}

install_node() {
# By default this will place NVM in $HOME/.nvm
if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.nvm_installed-${DATAFED_NVM_VERSION}" ]; then
echo "You must first install nvm before installing node."
exit 1
fi
Expand All @@ -191,15 +191,15 @@ install_node() {
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install "$DATAFED_NODE_VERSION"
# Mark node as installed
touch ".node_installed-${DATAFED_NODE_VERSION}"
touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.node_installed-${DATAFED_NODE_VERSION}"
else
export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
fi
}

install_foxx_cli() {
if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.nvm_installed-${DATAFED_NVM_VERSION}" ]; then
echo "You must first install nvm before installing foxx_cli."
exit 1
fi
Expand All @@ -214,7 +214,7 @@ install_foxx_cli() {
export NODE_VERSION="$DATAFED_NODE_VERSION"
"$NVM_DIR/nvm-exec" npm install --global foxx-cli --prefix "${DATAFED_DEPENDENCIES_INSTALL_PATH}/npm"
# Mark foxx_cli as installed
touch ".foxx_cli_installed"
touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.foxx_cli_installed"
else
export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
Expand Down

0 comments on commit 0a8c8f6

Please sign in to comment.