Fix filename output

This commit is contained in:
Nicolas Le Gall
2019-06-27 00:29:35 +02:00
parent e9576d180c
commit 36619f7ee0

View File

@@ -46,9 +46,9 @@ cryptr_encrypt() {
if [[ ! -z "${CRYPTR_PASSWORD}" ]]; then
echo "[notice] using environment variable CRYPTR_PASSWORD for the password"
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "$_file".aes -pass env:CRYPTR_PASSWORD
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}" -pass env:CRYPTR_PASSWORD
else
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "$_file".aes
openssl $OPENSSL_CIPHER_TYPE -salt -pbkdf2 -in "$_file" -out "${_file%\.aes}"
fi
}