-
Notifications
You must be signed in to change notification settings - Fork 0
/
xc-setup.sh
42 lines (34 loc) · 1017 Bytes
/
xc-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
#!/bin/bash
baseInstallDir=/tmp/com.xvim2.install
signingCert="XCodeSigner"
branch="master"
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
PURPLE='\033[0;35m'
RED='\033[0;31m'
NC='\033[0m' # No Color
cloneRepo() {
# if [ ! -d "$baseInstallDir" ]; then
# # Creating directory
# echo "Creating tmp directory in ${baseInstallDir}..."
# mkdir -p $baseInstallDir
# fi
rm -rf $baseInstallDir/
echo "${GREEN}Cloning repo..."
git clone -q https://github.com/XVimProject/XVim2.git $baseInstallDir
echo "${GREEN}Checkout out branch ${branch}..."
cd $baseInstallDir; git checkout -q $branch; git pull
}
installXVim2() {
if [[ $1 == *"-s"* ]]; then
echo "${YELLOW}Re-signing XCode..."
sudo codesign -f -s ${signingCert} /Applications/Xcode.app
fi
echo "${GREEN}Running make"
cd $baseInstallDir; make
echo "${BLUE}Complete! Restart Xcode, and hit load plugin!"
}
echo "${RED}Please close XCode!"
cloneRepo
installXVim2 $1