mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
scripts: reformat
This commit is contained in:
parent
c5117e8669
commit
8340228637
3 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@ function overwrite_remote_tag() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function has_release() {
|
function has_release() {
|
||||||
gh release view "${NIGHTLY_TAG}" &>/dev/null
|
gh release view "${NIGHTLY_TAG}" &> /dev/null
|
||||||
echo "$?"
|
echo "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ INPUT_FILE="${1:-}"
|
||||||
OUTPUT_FILE="${2:-}"
|
OUTPUT_FILE="${2:-}"
|
||||||
AGE_KEY="${3:-}"
|
AGE_KEY="${3:-}"
|
||||||
|
|
||||||
if ! command -v age 1>/dev/null; then
|
if ! command -v age 1> /dev/null; then
|
||||||
echo "age not installed"
|
echo "age not installed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $AGE_KEY && -n $INPUT_FILE && -n $OUTPUT_FILE ]]; then
|
if [[ -n $AGE_KEY && -n $INPUT_FILE && -n $OUTPUT_FILE ]]; then
|
||||||
age --encrypt -r "$(echo "${AGE_KEY}" | age-keygen -y)" -o "${OUTPUT_FILE}" <"${INPUT_FILE}"
|
age --encrypt -r "$(echo "${AGE_KEY}" | age-keygen -y)" -o "${OUTPUT_FILE}" < "${INPUT_FILE}"
|
||||||
else
|
else
|
||||||
echo "Usage: ./encrypt-secret.sh <input file> <output file> <encryption key>"
|
echo "Usage: ./encrypt-secret.sh <input file> <output file> <encryption key>"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,10 +7,10 @@ KEY_FILE="$(mktemp)"
|
||||||
|
|
||||||
trap "rm -rf ${KEY_FILE} 2>/dev/null" INT TERM EXIT
|
trap "rm -rf ${KEY_FILE} 2>/dev/null" INT TERM EXIT
|
||||||
|
|
||||||
echo "${ENCRYPT_KEY:?}" >"${KEY_FILE}"
|
echo "${ENCRYPT_KEY:?}" > "${KEY_FILE}"
|
||||||
|
|
||||||
function decrypt() {
|
function decrypt() {
|
||||||
if ! command -v age 1>/dev/null; then
|
if ! command -v age 1> /dev/null; then
|
||||||
echo "age not installed"
|
echo "age not installed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue