clearify GPL licensing; removing checkwait if hashsum is incorrect

This commit is contained in:
2015-06-25 10:18:42 +03:00
parent 544a21de1c
commit 19c1773568
2 changed files with 19 additions and 54 deletions

View File

@@ -1,5 +1,23 @@
# split-dl.sh
#
# Copyright (C) 2015 Max Mehl <mail@mehl.mx>
#
# 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
# (at your option) 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 <http://www.gnu.org/licenses/>.
#!/bin/bash
SPLITSIZE="10M" # Desired size of splitted files
INFO="info.cfg" # Desired name of document containing information
CHECKSUM="md5sum" # Define application to create hashsums
@@ -335,7 +353,7 @@ until [ "$STATUS" == "F" ]; do
elif [ -e $SMALLPATH ] && $(compdu $SMALLPATH $SMALLSIZE) && ! $(comphash $SMALLPATH $SMALLHASH); then
echo "[ERROR] Hashsum is different but file has same size."
echo "[INFO] Deleting file and starting new download."
checkwait
# checkwait
rm $SMALLPATH
wget -O $SMALLPATH $WGETOPT $SMALLURL
if $(compall $SMALLPATH $SMALLSIZE $SMALLHASH); then