Commit 3ce58e31 authored by Cédric Marie's avatar Cédric Marie

myzip/myunzip: Use .enc for encrypted files

Use .enc instead of .crypt, as the extension of encrypted files. This
is commonly used in openssl examples.
Signed-off-by: default avatarCédric Marie <cedric@hjuvi.lautre.net>
parent 28bcba27
#!/bin/sh
# myunzip - Uncompress a .tar.xz[.crypt] file
# myunzip - Uncompress a .tar.xz[.enc] file
# This file is part of Painted Shell - Shell configuration and scripts.
#
# Written in 2013-2018 by Cédric Marie
......@@ -35,7 +35,7 @@ shift $(($OPTIND - 1))
option_crypt=0
if [ "$1" = "" -o ! -f "$1" ]; then print_usage; exit 1; fi
file=${1%.crypt}
file=${1%.enc}
if [ "$file" != "$1" ]; then
option_crypt=1
[ -e "$file" ] && printf "$file already exists\n" && exit 1
......
#!/bin/sh
# myzip - Compress a directory to .tar.xz[.crypt] file
# myzip - Compress a directory to .tar.xz[.enc] file
# This file is part of Painted Shell - Shell configuration and scripts.
#
# Written in 2013-2018 by Cédric Marie
......@@ -47,7 +47,7 @@ else
fi
[ -e "$file" ] && printf "$file already exists\n" && exit 1
if [ $option_crypt -eq 1 ]; then
output_file=${file}.crypt
output_file=${file}.enc
[ -e "$output_file" ] && printf "$output_file already exists\n" && exit 1
else
output_file=$file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment