-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathenvConfig.sh
More file actions
35 lines (34 loc) · 1.12 KB
/
envConfig.sh
File metadata and controls
35 lines (34 loc) · 1.12 KB
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
31
32
33
34
35
#!/usr/bin/env bash
set -e
HOME=/home/vagrant
echo "Ensuring correct landing"
if ! grep -q "cd /vagrant" $HOME/.bashrc ; then
echo "cd /vagrant" >> $HOME/.bashrc
echo "Corrected..."
fi
if ! grep -q "alias dock='docker ps -a'" $HOME/.bashrc ; then
echo "alias dock='docker ps -a'" >> $HOME/.bashrc
echo "alias sls='/vagrant/node_modules/serverless/bin/serverless'" >> $HOME/.bashrc
# echo "alias nodemon='/vagrant/node_modules/nodemon/bin/nodemon'" >> $HOME/.bashrc
# echo "alias jest='node_modules/jest/bin/jest.js'" >> $HOME/.bashrc
fi
echo "Landing..."
echo "Installing packages"
sudo apt-get -qq update \
&& apt-get -qq install \
gcc \
curl \
npm \
nodejs \
ntp \
openjdk-11-jdk
echo "Updating Node"
sudo npm i -g n
sudo n lts
echo "Installing Yarn"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get -qq update && sudo apt-get -qq install yarn
echo "Installing Updates"
sudo apt-get -qq update && apt-get -qq upgrade
echo "Done"