forked from webrtc/KITE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configureMac.sh
executable file
·65 lines (48 loc) · 1.61 KB
/
configureMac.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
# This script will set the USER enviroment variable KITE_HOME to the current folder
# and add '%KITE_HOME%\scripts\path' to the USER PATH.
# It will close the current and open a new one with the command c, r and a ready to use
# to respectively compile, run and launch allure reports from the KITE Tests
KITE_HOME=`pwd`
if [ -n "$(grep "KITE_HOME" ~/.bash_profile)" ]
then
echo "Updating KITE_HOME"
sed -i'' -e '/KITE_HOME/d' ~/.bash_profile
fi
echo export KITE_HOME="$KITE_HOME" >> ~/.bash_profile
if [ -n "$(grep "scripts/mac/path" ~/.bash_profile)" ]
then
sed -i'' -e '/scripts/mac/path/d' ~/.bash_profile
fi
chmod +x $KITE_HOME/scripts/mac/
chmod +x $KITE_HOME/scripts/mac/path/*
chmod +x $KITE_HOME/third_party/allure-2.10.0/bin/allure
echo export PATH="\$PATH:\$KITE_HOME/scripts/mac/path" >> ~/.bash_profile
source ~/.bash_profile
if [ -n "$(grep "allure-2.10.0/bin" ~/.bash_profile)" ]
then
sed -i'' -e '/allure-2.10.0/bin/d' ~/.bash_profile
fi
echo export PATH="\$PATH:\$KITE_HOME/third_party/allure-2.10.0/bin/" >> ~/.bash_profile
function skipchoice(){
read -p "Do you want to install the local grid now? (y/n) " yn
case $yn in
[Yy]* )
installGrid
;;
[Nn]* )
startNewPrompt
;;
* ) echo "Please answer yes or no."
skipchoice;;
esac
}
startNewPrompt(){
osascript -e 'tell application "Terminal" to do script "rm .bash_profile-e;cd $KITE_HOME"'
kill -9 $PPID
}
installGrid(){
osascript -e 'tell application "Terminal" to do script "rm .bash_profile-e;cd $KITE_HOME;$KITE_HOME/scripts/mac/interactiveInstallation.sh"'
kill -9 $PPID
}
skipchoice