-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·38 lines (32 loc) · 731 Bytes
/
run.sh
File metadata and controls
executable file
·38 lines (32 loc) · 731 Bytes
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
#!/bin/bash
# Set install flag to false
install_flag=false
# Print help message
print_help() {
echo "Run the bot."
echo " "
echo "Usage: ./run.sh [options]"
echo " "
echo "Options:"
echo "-h show brief help"
echo "-i intall dependencies"
exit 0
}
# Parse command line arguments
while getopts 'ih' flag; do
case "${flag}" in
i) install_flag=true ;;
h) print_help ;;
*) print_help ;;
esac
done
# Move to src directory
cd "$(dirname "$(readlink -f "$0")")/.."
# Run the install script if the flag is set
if [ "$install_flag" = true ]; then
echo "Running install script..."
./scripts/install.sh
fi
# Run bot
echo "Running bot..."
pipenv run python bot.py