feat(blueprint.sh): add checks to see if dependencies are installed

This commit is contained in:
Ahwxorg 2023-07-30 09:46:15 +02:00 committed by GitHub
parent 560c9a1fc0
commit 6b5ce812f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,6 +7,22 @@
# This should allow Blueprint to run in docker. Please note that changing the $FOLDER variable after running # This should allow Blueprint to run in docker. Please note that changing the $FOLDER variable after running
# the Blueprint installation script will not change anything in any files besides blueprint.sh. # the Blueprint installation script will not change anything in any files besides blueprint.sh.
FOLDER="/var/www/pterodactyl" FOLDER="/var/www/pterodactyl"
# Check if required programs are installed
if ! [ -x "$(command -v unzip)" ]; then
log_red '[FATAL] Required dependency unzip is not installed or detected.' >&2
exit 1
fi
if ! [ -x "$(command -v node)" ]; then
log_red '[FATAL] Required depencency node is not installed or detected.' >&2
exit 1
fi
if ! [ -x "$(command -v yarn)" ]; then
log_red '[FATAL] Required depencendy yarn is not installed or detected.' >&2
exit 1
fi
# Check for panels that are using Docker. # Check for panels that are using Docker.
if [[ -f ".dockerenv" ]]; then if [[ -f ".dockerenv" ]]; then