simplified redundant creation of tmpdir

This commit is contained in:
Rexiel Scarlet 2024-11-24 22:56:22 +05:30
parent cfb1ead5b0
commit 71c1b6d179

View file

@ -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 {