node-hook/scripts/before_install.sh

15 lines
336 B
Bash
Raw Normal View History

2021-06-08 15:18:32 +02:00
#!/bin/bash
#download node and npm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
#create our working directory if it doesnt exist
DIR="/home/test-hook/express-app"
if [ -d "$DIR" ]; then
echo "${DIR} exists"
else
echo "Creating ${DIR} directory"
mkdir ${DIR}
fi