Skip to content
Permalink
Newer
Older
100644 46 lines (43 sloc) 1.13 KB
1
#!/bin/bash
2
3
# SETUP SCRIPT
4
# run this script to install all the required tools and packages.
5
6
red=`tput setaf 1`
7
green=`tput setaf 2`
8
reset=`tput sgr0`
9
10
echo
11
echo "========= CHANGING DIRECTORY TO ${green}FILES${reset} =============="
12
echo
13
if [[ -f "./files" ]]
14
then
15
cd files
16
fi
17
chmod +x .githooks/*
18
echo
19
echo "============= INSTALLING ${green}DEBIAN${reset} TOOLS =============="
20
echo
21
sudo apt update -y
22
sudo apt upgrade -y
23
sudo apt install -y psmisc lsof tree sqlite3 sqlite3-doc build-essential
24
echo
25
echo "========= INSTALLING NODE USING ${green}NODESOURCE${reset} ========="
26
echo
27
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
28
sudo apt install -y nodejs
29
echo
30
echo "=========== INSTALLING THE ${green}NODE PACKAGES${reset} ==========="
31
echo
32
npm install
33
npm audit fix
34
echo
35
echo "============== RUNNING THE ${green}UNIT TESTS${reset} =============="
36
echo
37
npm test
38
echo
39
echo "================ RUNNING THE ${green}LINTER${reset} ================"
40
echo
41
npm run linter
42
echo
43
echo "===== CHECKING THE VERSION OF ${green}NODEJS${reset} INSTALLED ====="
44
echo
45
node -v
46
echo "================= ${green}SETUP COMPLETED ${reset} ================="
You can’t perform that action at this time.