Add run script
This commit is contained in:
parent
38f3b0ed67
commit
1f621333de
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
VERSION="1.16.4"
|
||||
|
||||
wget -Omcdata.zip "https://apimon.de/mcdata/$VERSION/$VERSION.zip"
|
||||
rm -r minecraft_data || true
|
||||
mkdir minecraft_data
|
||||
unzip mcdata.zip -d minecraft_data
|
||||
rm mcdata.zip
|
36
run_linux.sh
Executable file
36
run_linux.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
# download minecraft data
|
||||
|
||||
if [ ! -d "minecraft_data" ]
|
||||
then
|
||||
echo "Grabbing minecraft data..."
|
||||
sleep 2
|
||||
|
||||
VERSION="1.16.4"
|
||||
|
||||
wget -Omcdata.zip "https://apimon.de/mcdata/$VERSION/$VERSION.zip"
|
||||
mkdir minecraft_data
|
||||
unzip mcdata.zip -d minecraft_data
|
||||
rm mcdata.zip
|
||||
fi
|
||||
|
||||
# create virtual environment
|
||||
|
||||
if [ ! -d "env" ]
|
||||
then
|
||||
echo "Installing Python requirements..."
|
||||
sleep 2
|
||||
|
||||
virtualenv -p python3 env
|
||||
source env/bin/activate
|
||||
pip install -r requirements.txt
|
||||
else
|
||||
source env/bin/activate
|
||||
fi
|
||||
|
||||
echo "Running bot..."
|
||||
|
||||
python main.py
|
Loading…
Reference in New Issue
Block a user