diff --git a/blueprint.sh b/blueprint.sh index ab526d1..895ae3a 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -176,17 +176,19 @@ assignflags() { F_developerIgnoreRebuild=false F_developerForceMigrate=false F_developerKeepApplicationCache=false + F_developerEscalateInstallScript=false F_developerEscalateExportScript=false - if [[ ( $flags == *"ignorePlaceholders,"* ) || ( $flags == *"ignorePlaceholders" ) ]]; then F_ignorePlaceholders=true ;fi - if [[ ( $flags == *"forceLegacyPlaceholders,"* ) || ( $flags == *"forceLegacyPlaceholders" ) ]]; then F_forceLegacyPlaceholders=true ;fi - if [[ ( $flags == *"hasInstallScript,"* ) || ( $flags == *"hasInstallScript" ) ]]; then F_hasInstallScript=true ;fi - if [[ ( $flags == *"hasRemovalScript,"* ) || ( $flags == *"hasRemovalScript" ) ]]; then F_hasRemovalScript=true ;fi - if [[ ( $flags == *"hasExportScript,"* ) || ( $flags == *"hasExportScript" ) ]]; then F_hasExportScript=true ;fi - if [[ ( $flags == *"developerIgnoreInstallScript,"* ) || ( $flags == *"developerIgnoreInstallScript" ) ]]; then F_developerIgnoreInstallScript=true ;fi - if [[ ( $flags == *"developerIgnoreRebuild,"* ) || ( $flags == *"developerIgnoreRebuild" ) ]]; then F_developerIgnoreRebuild=true ;fi - if [[ ( $flags == *"developerForceMigrate,"* ) || ( $flags == *"developerForceMigrate" ) ]]; then F_developerForceMigrate=true ;fi - if [[ ( $flags == *"developerKeepApplicationCache,"* ) || ( $flags == *"developerKeepApplicationCache" ) ]]; then F_developerKeepApplicationCache=true ;fi - if [[ ( $flags == *"developerEscalateExportScript,"* ) || ( $flags == *"developerEscalateExportScript" ) ]]; then F_developerEscalateExportScript=true ;fi + if [[ ( $flags == *"ignorePlaceholders,"* ) || ( $flags == *"ignorePlaceholders" ) ]]; then F_ignorePlaceholders=true ;fi + if [[ ( $flags == *"forceLegacyPlaceholders,"* ) || ( $flags == *"forceLegacyPlaceholders" ) ]]; then F_forceLegacyPlaceholders=true ;fi + if [[ ( $flags == *"hasInstallScript,"* ) || ( $flags == *"hasInstallScript" ) ]]; then F_hasInstallScript=true ;fi + if [[ ( $flags == *"hasRemovalScript,"* ) || ( $flags == *"hasRemovalScript" ) ]]; then F_hasRemovalScript=true ;fi + if [[ ( $flags == *"hasExportScript,"* ) || ( $flags == *"hasExportScript" ) ]]; then F_hasExportScript=true ;fi + if [[ ( $flags == *"developerIgnoreInstallScript,"* ) || ( $flags == *"developerIgnoreInstallScript" ) ]]; then F_developerIgnoreInstallScript=true ;fi + if [[ ( $flags == *"developerIgnoreRebuild,"* ) || ( $flags == *"developerIgnoreRebuild" ) ]]; then F_developerIgnoreRebuild=true ;fi + if [[ ( $flags == *"developerForceMigrate,"* ) || ( $flags == *"developerForceMigrate" ) ]]; then F_developerForceMigrate=true ;fi + if [[ ( $flags == *"developerKeepApplicationCache,"* ) || ( $flags == *"developerKeepApplicationCache" ) ]]; then F_developerKeepApplicationCache=true ;fi + if [[ ( $flags == *"developerEscalateInstallScript,"* ) || ( $flags == *"developerEscalateInstallScript" ) ]]; then F_developerEscalateInstallScript=true ;fi + if [[ ( $flags == *"developerEscalateExportScript,"* ) || ( $flags == *"developerEscalateExportScript" ) ]]; then F_developerEscalateExportScript=true ;fi } # Adds the "blueprint" command to the /usr/local/bin directory and configures the correct permissions for it. diff --git a/scripts/commands/extensions/install.sh b/scripts/commands/extensions/install.sh index f3cdbf2..3322dec 100644 --- a/scripts/commands/extensions/install.sh +++ b/scripts/commands/extensions/install.sh @@ -1222,16 +1222,26 @@ InstallExtension() { chmod --silent +x ".blueprint/extensions/$identifier/private/install.sh" 2>> "$BLUEPRINT__DEBUG" # Run script while also parsing some useful variables for the install script to use. - su "$WEBUSER" -s "$USERSHELL" -c " - cd \"$FOLDER\"; - EXTENSION_IDENTIFIER=\"$identifier\" \ - EXTENSION_TARGET=\"$target\" \ - EXTENSION_VERSION=\"$version\" \ - PTERODACTYL_DIRECTORY=\"$FOLDER\" \ - BLUEPRINT_VERSION=\"$VERSION\" \ - BLUEPRINT_DEVELOPER=\"$dev\" \ - bash .blueprint/extensions/$identifier/private/install.sh - " + if $F_developerEscalateInstallScript; then + EXTENSION_IDENTIFIER="$identifier" \ + EXTENSION_TARGET="$target" \ + EXTENSION_VERSION="$version" \ + PTERODACTYL_DIRECTORY="$FOLDER" \ + BLUEPRINT_VERSION="$VERSION" \ + BLUEPRINT_DEVELOPER="$dev" \ + bash .blueprint/extensions/"$identifier"/private/install.sh + else + su "$WEBUSER" -s "$USERSHELL" -c " + cd \"$FOLDER\"; + EXTENSION_IDENTIFIER=\"$identifier\" \ + EXTENSION_TARGET=\"$target\" \ + EXTENSION_VERSION=\"$version\" \ + PTERODACTYL_DIRECTORY=\"$FOLDER\" \ + BLUEPRINT_VERSION=\"$VERSION\" \ + BLUEPRINT_DEVELOPER=\"$dev\" \ + bash .blueprint/extensions/$identifier/private/install.sh + " + fi echo -e "\e[0m\x1b[0m\033[0m" fi fi