mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 09:27:03 +05:30
21 lines
409 B
Bash
Executable file
21 lines
409 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
ENCRYPT_KEY="${1}"
|
|
TEMP_KEY="$(mktemp)"
|
|
|
|
echo "${ENCRYPT_KEY:?}" > "${TEMP_KEY}"
|
|
|
|
function decrypt() {
|
|
if ! command -v age 1>/dev/null; then
|
|
echo "age not installed"
|
|
exit 1
|
|
fi
|
|
SRC="${1}"
|
|
DST="${2}"
|
|
age --decrypt -i "${TEMP_KEY}" -o "${DST:?}" "${SRC:?}"
|
|
}
|
|
|
|
decrypt secrets/keystore.cipher keystore.jks
|
|
decrypt secrets/props.cipher keystore.properties
|