-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall.sh
35 lines (28 loc) · 890 Bytes
/
install.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
#!/bin/sh
# Get the base directory and switch into it
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')");
cd "$basedir";
# Install package dependencies
echo "[SETUP] Installing package dependencies ...";
pip3 install -r requirements.txt;
# Check if the bot already has a name
if [ ! -f "bot.name" ]
then
# Name of the bot
echo "";
echo "In case you want to run more than one bot, you need to enter a unique name for each!";
echo "If you are already running a different bot, make sure you give this one another name!";
echo "";
echo -n "How do you want to call this bot: ";
read -r name;
# Make sure the name is valid
while [ ! ${#name} -ge 1 ]
do
echo "Name invalid, try again: ";
read -r name;
done
# Safe the name in a file
echo "[SETUP] Saving name ...";
echo "$name" > bot.name;
fi
echo "[SETUP] Done!";