Commit 5f1dbca7 authored by Cédric Marie's avatar Cédric Marie

mytarc/mytarx: Use .sha256 extension for checksum

Replace .sha256sum extension with just .sha256.
Signed-off-by: Cédric Marie's avatarCédric Marie <cedric@hjuvi.fr.eu.org>
parent 1032e4d3
......@@ -23,7 +23,7 @@ print_usage()
printf " -n don't compress (create .tar instead of .tar.xz)\n"
printf " -t timestamp output file\n"
printf " -e encrypt output file with password\n"
printf " -s create a .sha256sum file\n"
printf " -s create a .sha256 file\n"
}
option_dontcompress=0
......@@ -75,7 +75,7 @@ fi
chmod 444 $output_file
printf "\033[1mOutput file:\033[0m $output_file\n"
if [ $option_sha256sum -eq 1 ]; then
sha256sum $output_file > $output_file.sha256sum
chmod 444 $output_file.sha256sum
printf " + $output_file.sha256sum\n"
sha256sum $output_file > $output_file.sha256
chmod 444 $output_file.sha256
printf " + $output_file.sha256\n"
fi
......@@ -3,7 +3,7 @@
# mytarx - Extract an archive (.tar[.xz] file)
# This file is part of Painted Shell - Shell configuration and scripts.
#
# Written in 2013-2019 by Cédric Marie
# Written in 2013-2020 by Cédric Marie
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
......@@ -35,9 +35,9 @@ shift $(($OPTIND - 1))
option_crypt=0
if [ "$1" = "" -o ! -f "$1" ]; then print_usage; exit 1; fi
if [ -f "${1}.sha256sum" ]; then
if [ -f "${1}.sha256" ]; then
printf "\033[1mCheck sha256sum...\033[0m\n"
sha256sum -c ${1}.sha256sum || exit 1;
sha256sum -c ${1}.sha256 || exit 1;
fi
file=${1%.enc}
if [ "$file" != "$1" ]; then
......
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