-
Notifications
You must be signed in to change notification settings - Fork 1
/
MyWaifu-Linux.sh
54 lines (41 loc) · 1.22 KB
/
MyWaifu-Linux.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
50
51
52
53
54
#!/bin/bash
# Step: Check if Node.js is installed
if ! command -v node &> /dev/null
then
echo "Node.js is not installed. Please check the guide at https://github.com/2D-girls-enjoyer/MyWaifu."
exit 1
fi
cd ./api
if [ ! -d dist ]; then
echo "Installing dependencies in ./api..."
npm install
# Step: Run "npm run build"
echo "Building the project in ./api..."
npm run build
# Step: Delete the "node_modules" folder
echo "Deleting node_modules in ./api..."
rm -rf node_modules
# Step: Run "npm install --omit=dev"
echo "Installing production dependencies in ./api..."
npm install --omit=dev
fi
# Step: Access the "./ui" folder
cd ../ui
if [ ! -d dist ]; then
# Step: Run "npm i"
echo "Installing dependencies in ./ui..."
npm install
# Step: Run "npm run build"
echo "Building the project in ./ui..."
npm run build
# Step: Delete the "node_modules" folder
echo "Deleting node_modules in ./ui..."
rm -rf node_modules
# Step: Run "npm install --omit=dev"
echo "Installing production dependencies in ./ui..."
npm install --omit=dev
fi
# Step: Return to the previous folder
cd ..
# Script finished, starting the Servers
node scripts/startServers.js