Browse Source

Update 'do-hashcheck'

master
dolsen 5 months ago
parent
commit
cfe5b805f5
  1. 40
      do-hashcheck

40
do-hashcheck

@ -1,19 +1,6 @@
#!/bin/sh
##########################################################################
# Copyright (C) 2021 Derek Olsen <orpheusui@protonmail.com> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
##########################################################################
# Usage:
@ -38,37 +25,10 @@ fi
# Ask user for prehash
if [[ -n $2 ]]; then
echo "do-hashcheck Copyright (C) 2021 Derek Olsen"
echo "This program comes with ABSOLUTELY NO WARRANTY."
echo "This is free software, and you are welcome to redistribute it"
echo "under certain conditions."
PREHASH=$2
else
echo "This program comes with ABSOLUTELY NO WARRANTY; for details type \`show w'."
echo "This is free software, and you are welcome to redistribute it"
echo "under certain conditions; type \`show c' for details."
$GO'Enter trusted hash:'
read
if [[ ${REPLY} == "show w" ]]; then
echo "THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY"
echo "APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT"
echo "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY"
echo "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,"
echo "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR"
echo "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM"
echo "IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF"
echo "ALL NECESSARY SERVICING, REPAIR OR CORRECTION."
exit 0
elif [[ ${REPLY} == "show c" ]]; then
echo "IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING"
echo "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS"
echo "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY"
echo "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE"
echo "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF"
echo "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD"
echo "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),"
echo "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF"
echo "SUCH DAMAGES."
exit 0
elif [[ -z ${REPLY} ]]; then
$STOP'No hash'
exit 2

Loading…
Cancel
Save