diff --git a/build.xml b/build.xml
index 8eddf3e75..68ab7b725 100644
--- a/build.xml
+++ b/build.xml
@@ -242,11 +242,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
${provision.message}
@@ -254,11 +277,11 @@
-
+
-
-
+
+
diff --git a/src/qz/utils/ArgParser.java b/src/qz/utils/ArgParser.java
index dae8854b3..9303dd14d 100644
--- a/src/qz/utils/ArgParser.java
+++ b/src/qz/utils/ArgParser.java
@@ -11,6 +11,7 @@
package qz.utils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.ssl.Base64;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import qz.build.JLink;
@@ -23,6 +24,7 @@
import qz.build.provision.ProvisionBuilder;
import java.io.File;
+import java.io.FileOutputStream;
import java.lang.reflect.Field;
import java.util.*;
import java.util.List;
@@ -256,11 +258,21 @@ public ExitStatus processBuildArgs(ArgValue argValue) {
return SUCCESS;
case PROVISION:
ProvisionBuilder provisionBuilder;
-
- String jsonParam = valueOpt("--json");
- if(jsonParam != null) {
+ String param;
+ if((param = valueOpt("--base64")) != null) {
+ // Process JSON provision file (overwrites existing provisions)
+ File tempFile = File.createTempFile("provision", ".json");
+ log.info("Writing provisioning file from base64 {}", tempFile);
+ log.info(param);
+ byte[] decoded = Base64.decodeBase64(param);
+ try(FileOutputStream outputStream = new FileOutputStream(tempFile)) {
+ outputStream.write(decoded);
+ provisionBuilder = new ProvisionBuilder(tempFile, valueOpt("--target-os"), valueOpt("--target-arch"));
+ provisionBuilder.saveJson(true);
+ }
+ } else if((param = valueOpt("--json")) != null) {
// Process JSON provision file (overwrites existing provisions)
- provisionBuilder = new ProvisionBuilder(new File(jsonParam), valueOpt("--target-os"), valueOpt("--target-arch"));
+ provisionBuilder = new ProvisionBuilder(new File(param), valueOpt("--target-os"), valueOpt("--target-arch"));
provisionBuilder.saveJson(true);
} else {
// Process single provision step (preserves existing provisions)