-
-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathinstall_deps.sh
More file actions
30 lines (25 loc) · 748 Bytes
/
install_deps.sh
File metadata and controls
30 lines (25 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if [ -z "$NVM_DIR" ]; then
echo "Error: NVM_DIR environment variable is not set" >&2
exit 1
fi
if [ -z "$NODE_VERSION" ]; then
echo "Error: NODE_VERSION environment variable is not set" >&2
exit 1
fi
for i in {1..20}; do
apt-get update && apt-get install -y curl gpg-agent && break
echo "apt-get failed, retrying... ($i/20)"
sleep 30
done
mkdir -p $NVM_DIR
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source $NVM_DIR/nvm.sh
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
for i in {1..20}; do
apt-get install -y unzip p7zip-full && npm install -g nodemon && break
echo "apt-get failed, retrying... ($i/20)"
sleep 30
done
npm install --production