forked from webrtc/KITE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configureLinux.sh
executable file
·53 lines (43 loc) · 1.32 KB
/
configureLinux.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
# 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`
NEW_PATH=\$PATH:\$KITE_HOME/scripts/linux/path:\$KITE_HOME/third_party/allure-2.10.0/bin
if [ -n "$(grep "KITE_HOME" ~/.bashrc)" ]
then
echo "Updating KITE_HOME"
sed -i '/KITE_HOME/d' ~/.bashrc
fi
echo export KITE_HOME="$KITE_HOME" >> ~/.bashrc
chmod +x scripts/linux/path/*
chmod +x scripts/linux/*.sh
chmod +x $KITE_HOME/third_party/allure-2.10.0/bin/allure
if [ -n "$(grep "\$KITE_HOME" ~/.bashrc)" ]
then
sed -i '/$KITE_HOME/d' ~/.bashrc
fi
sed -i 's,/'"$KITE_HOME"'.*$,'"$NEW_PATH"',g' ~/.bashrc
echo export PATH="$NEW_PATH" >> ~/.bashrc
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(){
x-terminal-emulator -e 'sh -c "exec bash; cd $KITE_HOME"'
}
installGrid(){
x-terminal-emulator -e 'sh -c "exec bash; cd $KITE_HOME"'
cd $KITE_HOME/scripts/linux
./interactiveInstallation.sh
}
skipchoice