From f5eed6a5217584905b4d1d18820ce1fc5c1b4f1d Mon Sep 17 00:00:00 2001 From: purple Date: Fri, 23 Jun 2023 21:55:01 +0200 Subject: [PATCH 1/4] Development files disappeared after exporting, this is now fixed. --- blueprint.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index cbfdd11..a052765 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -49,6 +49,9 @@ source .blueprint/lib/parse_yaml.sh; source .blueprint/lib/db.sh; source .blueprint/lib/telemetry.sh; +# Re-create "tmp" folder just in case. +mkdir .blueprint/.storage/tmp > /dev/null; + # -exec if [[ "$1" == *"-exec"* ]]; then # Update the telemetry id to argument. @@ -441,16 +444,18 @@ if [[ ( $2 == "-build" ) || ( $2 == "-test" ) ]]; then sendTelemetry "BUILD_DEVELOPMENT_EXTENSION" > /dev/null; fi; +# -export if [[ $2 == "-export" ]]; then log_yellow "[WARNING] This is an experimental feature, proceed with caution."; log_bright "[INFO] Exporting extension files located in '.blueprint/.development'."; - cd .blueprint - eval $(parse_yaml .development/conf.yml) - mkdir .storage/tmp/$info_identifier - mv .development/* .storage/tmp/$info_identifier/ - zip .storage/tmp/blueprint.zip .storage/tmp/$info_identifier + cd .blueprint; + eval $(parse_yaml .development/conf.yml); + mkdir .storage/tmp/$info_identifier; + cp -R .development/* .storage/tmp/$info_identifier/; + zip .storage/tmp/blueprint.zip .storage/tmp/$info_identifier; mv .storage/tmp/blueprint.zip ../$info_identifier.blueprint; + rm -R .storage/tmp/*; log_bright "[INFO] Extension files should be exported into your Pterodactyl directory now."; fi; From e06f920c44bfd861532226bea37881807033e64e Mon Sep 17 00:00:00 2001 From: purple Date: Fri, 23 Jun 2023 21:59:52 +0200 Subject: [PATCH 2/4] Exporting was trying to generate a zip from an ungenerated file, this is now fixed. --- blueprint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index a052765..0120740 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -453,7 +453,7 @@ if [[ $2 == "-export" ]]; then eval $(parse_yaml .development/conf.yml); mkdir .storage/tmp/$info_identifier; cp -R .development/* .storage/tmp/$info_identifier/; - zip .storage/tmp/blueprint.zip .storage/tmp/$info_identifier; + zip .storage/tmp/$info_identifier .storage/tmp/$info_identifier; mv .storage/tmp/blueprint.zip ../$info_identifier.blueprint; rm -R .storage/tmp/*; @@ -516,8 +516,8 @@ if [[ $2 == "-upgrade" ]]; then if [[ $score == 1 ]]; then log_green "[SUCCESS] Blueprint has upgraded successfully."; elif [[ $score == 0 ]]; then - log_red "[FATAL] Upgrading has failed." + log_red "[FATAL] Upgrading may have failed."; else - log_yellow "[WARNING] Some post-upgrade checks have failed." + log_yellow "[WARNING] Some post-upgrade checks have failed."; fi; fi; From 95a5e123a3e61b5b9e9e8a9dca5382f647714cd0 Mon Sep 17 00:00:00 2001 From: purple Date: Fri, 23 Jun 2023 22:02:10 +0200 Subject: [PATCH 3/4] Forgot to change one line.\ --- blueprint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprint.sh b/blueprint.sh index 0120740..07f5d36 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -453,7 +453,7 @@ if [[ $2 == "-export" ]]; then eval $(parse_yaml .development/conf.yml); mkdir .storage/tmp/$info_identifier; cp -R .development/* .storage/tmp/$info_identifier/; - zip .storage/tmp/$info_identifier .storage/tmp/$info_identifier; + zip .storage/tmp/$info_identifier .storage/tmp/blueprint.zip; mv .storage/tmp/blueprint.zip ../$info_identifier.blueprint; rm -R .storage/tmp/*; From c0c0244ede1c19d2e0631726e2b74a13b4b3023f Mon Sep 17 00:00:00 2001 From: purple Date: Fri, 23 Jun 2023 22:04:52 +0200 Subject: [PATCH 4/4] Fix "zip" command not having correct arguments Why so many commits one by one? I need to test them one by one as well. Even if this one doesn't work, I'm going to bed, see you tomorrow. --- blueprint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 07f5d36..16947ee 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -453,8 +453,8 @@ if [[ $2 == "-export" ]]; then eval $(parse_yaml .development/conf.yml); mkdir .storage/tmp/$info_identifier; cp -R .development/* .storage/tmp/$info_identifier/; - zip .storage/tmp/$info_identifier .storage/tmp/blueprint.zip; - mv .storage/tmp/blueprint.zip ../$info_identifier.blueprint; + zip .storage/tmp/$info_identifier; + mv .storage/tmp/$info_identifier.zip ../$info_identifier.blueprint; rm -R .storage/tmp/*; log_bright "[INFO] Extension files should be exported into your Pterodactyl directory now.";