We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc1330c commit c4bbb9dCopy full SHA for c4bbb9d
src/hst_autocompile.sh
@@ -12,7 +12,9 @@
12
clear
13
14
# Define download function
15
+set -e
16
download_file() {
17
+ set +e
18
local url=$1
19
local destination=$2
20
local force=$3
@@ -50,6 +52,11 @@ download_file() {
50
52
if [ ! -f "$ARCHIVE_DIR/$filename" ]; then
51
53
[ "$HESTIA_DEBUG" ] && >&2 echo DEBUG: wget $url -q $dstopt --show-progress --progress=bar:force --limit-rate=3m
54
wget $url -q $dstopt --show-progress --progress=bar:force --limit-rate=3m
55
+ if [ $? -ne 0 ]; then
56
+ >&2 echo "[!] Archive $ARCHIVE_DIR/$filename is corrupted and exit script";
57
+ rm -f $ARCHIVE_DIR/$filename
58
+ exit 1;
59
+ fi
60
fi
61
62
if [ ! -z "$destination" ] && [ "$is_archive" = "true" ]; then
0 commit comments