-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_generate.sh
executable file
·109 lines (86 loc) · 2.18 KB
/
install_generate.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
clear
#Kill Xcode
killall "Xcode"
displayCompilerInfo() {
printf "\n"
printf "\n"
echo -n "### Current Compiler"
printf "\n"
eval xcrun swift -version
eval xcode-select --print-path
}
xcodegenGenerate() {
printf "\n"
printf "\n"
echo 'Gerando os projetos para abrir o app'
echo 'Entrando no modulos para gerar os modulos primeiros'
#Generate Feature Module
cd Modules
#Generate Core Module
cd Core
xcodegen generate
#Generate Account Module
cd ..
cd Account
xcodegen generate
#Generate Account Module
cd ..
cd Home
xcodegen generate
#Generate App
echo 'Gerando o modulo principal'
cd ..
cd ..
xcodegen generate
#Workspace grouping
# cp -R "contents.xcworkspacedata" "Design System.xcworkspace/contents.xcworkspacedata"
}
################################################################################
echo "### Brew"
echo " [1] : Install"
echo " [2] : Update"
echo " [3] : Skip"
echo -n "Option? "
read option
case $option in
[1] ) /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ;;
[2] ) eval brew update ;;
*) echo "Ignored...."
;;
esac
################################################################################
printf "\n"
echo "### Xcodegen"
echo " [1] : Install"
echo " [2] : Upgrade"
echo " [3] : No/Skip"
echo -n "Option? "
read option
case $option in
[1] ) brew install xcodegen ;;
[2] ) brew upgrade xcodegen ;;
*) echo "Ignored...."
;;
esac
################################################################################
displayCompilerInfo
################################################################################
printf "\n"
printf "\n"
echo "### Perform Xcodegen?"
echo " [1] : Yes"
echo " [2] : No/Skip"
echo -n "Option? "
read option
case $option in
[1] ) xcodegenGenerate ;;
*) echo "Ignored...."
;;
esac
xed .
xcodegen dump --type graphviz --file ../Documents/Graph.viz
xcodegen dump --type json --file ../Documents/Graph.json
echo " ╔═══════════════════════╗"
echo " ║ Done! You're all set! ║"
echo " ╚═══════════════════════╝"