-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·22 lines (21 loc) · 1.8 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
if ! [ -f '.env' ]; then
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m An environment file (.env) was not found!'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m It must contain (in key=value pairs):'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - BOT_PREFIX'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - DATA_TYPE ("file" or "memory")'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - DATA_PATH (the path to a data directory if DATA_TYPE is "file")'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - SHRED_TOKEN_name (define as many as you want, replace "name" with the actual name)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m It may also optionally contain:'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - BOT_SYSADMINS (if you intend to manage the bot over discord)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - RESOURCE_GUILDS (if resource guilds are used)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - QALCULATE_HELPER_PATH (for *calc)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - QALCULATE_HOME_PATH (ditto)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - GOOGLE_TOKENS (for *google)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - YOUTUBE_EMAIL (for youtube age-restricted video playback)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - YOUTUBE_PASSWORD (ditto)'
echo '\e[1;30mRunner \e[0;39m \e[1;31m[E]\e[0;39m - MANAGEMENT_PORT (to run a management server)'
exit 1;
fi;
echo '\e[1;30mRunner \e[0;39m \e[34m[I]\e[0;39m Compiling'
env $(xargs < '.env') mvn -Dstyle.color=always -q clean compile exec:java -pl 'libot-runner' -am