-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_.setup.sh
64 lines (55 loc) · 1.54 KB
/
_.setup.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
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# Socrates setup
# installs dependencies for dev and production
ARG1=$1
PROJECT_ROOT="$PWD"
SHARED="shared"
DESKTOP="client/desktop"
DESKTOP_WWW="client/desktop/www"
DESKTOP_WWW_BUILDER="client/desktop/www/builder"
SERVER_WORKER_ADMIN="server/worker/admin"
SERVER_WORKER_CLOUD="server/worker/cloud"
SERVER_WORKER_USER="server/worker/user"
SERVER_WORKER_WALLET="server/worker/wallet"
SERVER_WORKER_PROXY="server/worker/proxy"
SERVER_WORKER_SHARED="server/worker/shared"
# module list for setup
MODULES=()
MODULES+=($SHARED)
MODULES+=($DESKTOP)
MODULES+=($DESKTOP_WWW)
MODULES+=($DESKTOP_WWW_BUILDER)
# MODULES+=($SERVER_WORKER_ADMIN)
# MODULES+=($SERVER_WORKER_CLOUD)
MODULES+=($SERVER_WORKER_USER)
MODULES+=($SERVER_WORKER_WALLET)
MODULES+=($SERVER_WORKER_PROXY)
MODULES+=($SERVER_WORKER_SHARED)
RED="\e[31m"
CYAN="\e[96m"
ENDCOLOR="\e[0m"
# iterate modules and install its dependencies for each
for key in "${!MODULES[@]}"
do
echo -e "${CYAN} ${ENDCOLOR}"
echo -e "${CYAN}============================${ENDCOLOR}"
echo -e "${CYAN}Installing dependencies: ${MODULES[$key]}${ENDCOLOR}"
cd ./${MODULES[$key]}
npm install
cd $PROJECT_ROOT
done
echo -e "${CYAN} ${ENDCOLOR}"
echo -e "${CYAN}============================${ENDCOLOR}"
echo -e "${CYAN}Setup completed.${ENDCOLOR}"
# show how to run instructions?
# case "$ARG1" in
# "case1")
# echo "do something"
# ;;
# "case2")
# echo "do something"
# ;;
# *)
# echo "default"
# ;;
# esac