From 390c3405c3d5e2a3dba593ba95fb84e6b2b43233 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Thu, 22 Apr 2021 01:40:01 +0000 Subject: [PATCH] Add dependency checks --- README.md | 2 +- run_linux.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3e0a06..fd2070d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Assuming Debian / Ubuntu based distro: ``` $ sudo apt update -$ sudo apt install build-essential python3 python3-dev python3-pip python3-virtualenv git +$ sudo apt install build-essential python3 python3-dev python3-pip python3-virtualenv git wget unzip $ git clone https://git.tannercollin.com/tanner/minecraft-bot.git $ cd minecraft-bot/ diff --git a/run_linux.sh b/run_linux.sh index d846c1f..a4c005c 100755 --- a/run_linux.sh +++ b/run_linux.sh @@ -2,6 +2,42 @@ set -eu +if ! command -v virtualenv &> /dev/null +then + echo "virtualenv could not be found, please install with:" + echo "sudo apt install python3-virtualenv" + exit +fi + +if ! command -v wget &> /dev/null +then + echo "wget could not be found, please install with:" + echo "sudo apt install wget" + exit +fi + +if ! command -v unzip &> /dev/null +then + echo "unzip could not be found, please install with:" + echo "sudo apt install unzip" + exit +fi + +if ! command -v python3 &> /dev/null +then + echo "python3 could not be found, please install with:" + echo "sudo apt install python3" + exit +fi + +if ! command -v pip3 &> /dev/null +then + echo "pip3 could not be found, please install with:" + echo "sudo apt install pip3" + exit +fi + + # download minecraft data if [ ! -d "minecraft_data" ]