Fixed if statement issue

This commit is contained in:
purple 2023-03-23 11:54:40 +01:00
parent 6021828af3
commit 5512976f67

View file

@ -3,7 +3,7 @@
VERSION="indev";
cd /var/www/pterodactyl;
if [ "$@" == *"-php"* ]; then
if [[ "$@" == *"-php"* ]]; then
exit 1;
fi;
@ -15,7 +15,7 @@ source .blueprint/lib/bash_colors.sh;
source .blueprint/lib/parse_yaml.sh;
source .blueprint/lib/db.sh;
if [ $1 != "-bash" ]; then
if [[ $1 != "-bash" ]]; then
if dbValidate "blueprint.setupFinished"; then
clr_blue "This command only works if you have yet to install Blueprint. You can run \"\033[1;94mblueprint\033[0m\033[0;34m\" instead.";
dbRemove "blueprint.setupFinished";
@ -44,12 +44,12 @@ if [ $1 != "-bash" ]; then
fi;
fi;
if [ $2 == "-i" ]; then
if [ $3 == "" ]; then
if [[ $2 == "-i" ]]; then
if [[ $3 == "" ]]; then
clr_bright "Expected 1 argument but got 0.";
fi;
FILE=$3".blueprint"
if [ ! -f "$FILE" ]; then
if [[ ! -f "$FILE" ]]; then
echo "$FILE could not be found.";
exit 1;
fi
@ -63,7 +63,7 @@ if [ $2 == "-i" ]; then
cp -R .blueprint/defaults/extensions/admin.default .blueprint/defaults/extensions/admin.default.bak 2> /dev/null;
eval $(parse_yaml .blueprint/tmp/$3/conf.yml)
if [ $target != $VERSION ]; then
if [[ $target != $VERSION ]]; then
clr_yellow "The operation could not be completed since the target version of the extension ($target) does not match your Blueprint version ($VERSION).";
rm -R .blueprint/tmp/$3;
exit 1;
@ -92,6 +92,6 @@ echo -e "#!/bin/bash\nbash /var/www/pterodactyl/blueprint.sh -bash \$@;" > /usr/
chmod u+x /var/www/pterodactyl/blueprint.sh > /dev/null;
chmod u+x /usr/local/bin/blueprint > /dev/null;
if [ $2 == "help" ]; then
if [[ $2 == "help" ]]; then
echo -e "";
fi;