From 71c1b6d179238d4273519146f7e80d8ce452f0a9 Mon Sep 17 00:00:00 2001 From: Rexiel Scarlet <37258415+Rexcrazy804@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:56:22 +0530 Subject: [PATCH] simplified redundant creation of tmpdir --- pkgs/agenix.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pkgs/agenix.sh b/pkgs/agenix.sh index 603b975..d65d2c8 100644 --- a/pkgs/agenix.sh +++ b/pkgs/agenix.sh @@ -227,16 +227,8 @@ function encrypt { fi done <<< "$KEYS" - ENCRYPTED_DIR=$(@mktempBin@ -d) - ENCRYPTED_FILE="$ENCRYPTED_DIR/$(basename "$OUTPUT")" - - ENCRYPT+=(-o "$ENCRYPTED_FILE") - + ENCRYPT+=(-o "$OUTPUT") @ageBin@ "${ENCRYPT[@]}" <"$FILE" || exit 1 - - mkdir -p "$(dirname "$FILE")" - - mv -f "$ENCRYPTED_FILE" "$OUTPUT" } function rekey {