aboutsummaryrefslogtreecommitdiffstats
path: root/dfly-update
diff options
context:
space:
mode:
Diffstat (limited to 'dfly-update')
-rwxr-xr-xdfly-update7
1 files changed, 5 insertions, 2 deletions
diff --git a/dfly-update b/dfly-update
index e54dba7..561adc0 100755
--- a/dfly-update
+++ b/dfly-update
@@ -25,6 +25,7 @@ EC_OS=10
EC_TMPFILE=11
EC_MD5=12
EC_ARGS=13
+EC_FETCH=14
#
@@ -162,7 +163,7 @@ get_latest_image() {
local tmpchecksum=$(mktemp -t ${NAME}) || exit ${EC_TMPFILE}
local latest_filename latest_md5 line
echo "Fetch remote systems checksum: ${url_checksum}" >&2
- fetch -q -o ${tmpchecksum} "${url_checksum}"
+ fetch -q -o ${tmpchecksum} "${url_checksum}" || exit ${EC_FETCH}
if is_master_branch "${branch}"; then
line=$(fgrep '.img.bz2' ${tmpchecksum} | tail -n 1)
else
@@ -246,7 +247,9 @@ download_image() {
echo " => ${outfile}"
fetch -o "${outfile}" "${url}" \
&& echo "DONE" \
- || exit $?
+ || exit ${EC_FETCH}
+}
+
}