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
|
fi
|
||||||
done <<< "$KEYS"
|
done <<< "$KEYS"
|
||||||
|
|
||||||
ENCRYPTED_DIR=$(@mktempBin@ -d)
|
ENCRYPT+=(-o "$OUTPUT")
|
||||||
ENCRYPTED_FILE="$ENCRYPTED_DIR/$(basename "$OUTPUT")"
|
|
||||||
|
|
||||||
ENCRYPT+=(-o "$ENCRYPTED_FILE")
|
|
||||||
|
|
||||||
@ageBin@ "${ENCRYPT[@]}" <"$FILE" || exit 1
|
@ageBin@ "${ENCRYPT[@]}" <"$FILE" || exit 1
|
||||||
|
|
||||||
mkdir -p "$(dirname "$FILE")"
|
|
||||||
|
|
||||||
mv -f "$ENCRYPTED_FILE" "$OUTPUT"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function rekey {
|
function rekey {
|
||||||
|
|
Loading…
Reference in a new issue