aboutsummaryrefslogtreecommitdiff
path: root/scripts/signing-setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/signing-setup.sh')
-rwxr-xr-xscripts/signing-setup.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/signing-setup.sh b/scripts/signing-setup.sh
new file mode 100755
index 00000000..362ec583
--- /dev/null
+++ b/scripts/signing-setup.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+set -e
+
+ENCRYPT_KEY=$1
+
+declare -A SECRETS
+SECRETS[secrets/keystore.cipher]=keystore.jks
+SECRETS[secrets/props.cipher]=keystore.properties
+
+if [[ -n "$ENCRYPT_KEY" ]]; then
+ for src in "${!SECRETS[@]}"; do
+ openssl enc -aes-256-cbc -md sha256 -pbkdf2 -d -in "${src}" -out "${SECRETS[${src}]}" -k "${ENCRYPT_KEY}"
+ done
+else
+ echo "Usage: ./signing-setup.sh <encryption key>"
+fi