mirror of
https://github.com/ryantm/agenix.git
synced 2024-12-22 15:48:30 +03:00
simplified redundant creation of tmpdir
This commit is contained in:
parent
cfb1ead5b0
commit
71c1b6d179
1 changed files with 1 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue