-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathios.sh
More file actions
executable file
路82 lines (70 loc) 路 1.92 KB
/
Copy pathios.sh
File metadata and controls
executable file
路82 lines (70 loc) 路 1.92 KB
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
#!/bin/sh
source ./.terminal/ui.sh
function print_usage {
echo "Usage: ./ios.sh [--version|--help]"
echo ""
echo " --version display the project version"
echo " --help get more information"
echo ""
}
case "${1}" in
--help )
print_usage
exit 0
;;
--version )
echo "Version 1.0.0"
exit 0
;;
* )
;;
esac
##
## Xcode.
##
## Xcode is an integrated development environment for macOS containing a suite of software
## development tools developed by Apple for developing software for macOS, iOS, watchOS, and tvOS.
##
## See more: https://developer.apple.com/xcode/.
##
# step "Install Xcode"
# mas install 497799835
# if [ $? -eq 0 ]; then
# success "Sucessfully installed Xcode."
# else
# error "Fail to install Xcode."
# fi
sudo xcodebuild -license accept
##
## Xcode command line tools.
##
## Download the macOS SDK, headers, and build tools such as the Apple LLVM compiler and Make.
## These tools make it easy to install open source software or develop on UNIX within Terminal.
##
## See more: https://developer.apple.com.
##
step "Install Xcode command line tools"
xcode_select_output="$(xcode-select --install 2>&1 >/dev/null)"
if [ $? -eq 0 ]; then
success "Sucessfully installed Xcode command line tools"
elif echo "$xcode_select_output" | grep -i "command line tools are already installed"; then
success "Xcode command line tools is already installed"
else
error "Fail to install Xcode command line tools."
fi
##
## Charles.
##
## Charles Web Debugging Proxy is a cross-platform HTTP debugging proxy server application written in Java.
##
## See more: https://www.charlesproxy.com.
##
step "Install Charles"
charles_output="$(brew install --cask charles 2>&1 >/dev/null)"
if [ $? -eq 0 ]; then
success "Sucessfully installed Charles"
elif echo "$charles_output" | grep -i "It seems there is already an App"; then
success "Charles is already installed"
else
error "Fail to install Charles."
fi