-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·49 lines (39 loc) · 1.13 KB
/
install.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
printf "softeng21-08 Installation Script\n\n"
# CLI
cd ./cli
# Install dependencies
printf "Installing CLI dependencies... "
if npm install --silent > /dev/null 2>&1
then
printf "\u2714\n"
else
printf "Error while installing NPM modules. Make sure Node.js and NPM are installed.\n"
exit 1
fi
# Create symbolic link "se2108"
printf "Creating 'se2108' symbolic link... "
npm link --silent > /dev/null 2>&1
printf "\u2714\n"
# CLI testing tool
cd ../test-cli
# Install dependencies
printf "Installing CLI testing tool dependencies... "
npm install --silent > /dev/null 2>&1
printf "\u2714\n"
# Create symbolic link "cli-test"
printf "Creating 'cli-test' symbolic link... "
npm link --silent > /dev/null 2>&1
printf "\u2714\n"
# Docker containers for Back-end, Front-end, MySQL, Redis
cd ..
printf "Building Docker containers... "
if (docker-compose build || docker compose build) > /dev/null 2>&1
then
printf "\u2714\n"
else
printf "\u2714\nError while building Docker containers. Make sure Docker is installed and running.\n"
exit 1
fi
printf "\nDone. Type 'docker compose up' to run the application.\n"
exit 0