-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.sh
executable file
·48 lines (42 loc) · 1.18 KB
/
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
43
44
45
46
47
48
#!/bin/bash
#
# WelcomeBot setup
#
rev="`git rev-list HEAD --max-count=1 --abbrev-commit 2>/dev/null`"
if [ "$#" -gt 1 ] || ( [ "$#" -eq 1 ] && [ "$1" == "--help" ] ) ;
then
echo "Set up WelcomeBot."
echo
echo "Usage:"
echo " $0 [--help | --no-clone]"
echo
echo "Options:"
echo " --help Print this help message and exit"
echo " --no-clone Do NOT clone a WelcomeBot git repo (default behavior when inside a repo)"
exit 1
fi
hello="Setting up WelcomeBot"
if [ "$rev" == "" ] ;
then
echo "$hello."
else
echo "$hello (revision: $rev)."
fi
if [ "$1" == "--no-clone" ] && [ "$rev" == "" ] ;
then
echo "There's nothing to setup. Please obtain a copy of WelcomeBot source code first."
exit 1
elif [ "$1" == "--no-clone" ] || [ "$rev" != "" ];
then
echo "Cloning supressed, assuming `pwd` as a WelcomeBot git repo directory."
else
echo "Cloning WelcomeBot..."
git clone https://github.com/michaelpri10/WelcomeBot.git michaelpri10/WelcomeBot
cd "`pwd`/michaelpri10/WelcomeBot"
fi
git submodule update --init
pip install beautifulsoup4
pip install requests --upgrade
pip install websocket-client --upgrade
echo "Setup completed."
exit 0