From f76bad03285118c06475c98d1d1c35263202e8a4 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 30 Oct 2015 16:33:57 -0400 Subject: src/download.sh: Replace err() with dbg() We can print more user-friendly error messages at higher levels in the application. --- diff --git a/src/download.sh b/src/download.sh index 60d4ea0..b1805d9 100644 --- a/src/download.sh +++ b/src/download.sh @@ -30,7 +30,7 @@ init_temp_dir() rand temp_dir="${tmpdir}/firman-$(printf '%010d' ${rand_x})" if ! mkdir "${temp_dir}"; then - err 'Failed to create temporary directory' + dbg 'Failed to create temporary directory' return 1 fi @@ -40,7 +40,7 @@ init_temp_dir() fini_temp_dir() { if ! rmdir "${temp_dir}"; then - err 'Failed to remove temporary directory' + dbg 'Failed to remove temporary directory' return 1 fi @@ -59,7 +59,7 @@ dl() shift 1 if ! ${WGET} -q -O - "${url}"; then - err 'Failed to download "%s"' "${url}" + dbg 'Failed to download "%s"' "${url}" return 1 fi @@ -73,7 +73,7 @@ dl_temp() shift 2 if ! ${WGET} -q -O "${temp_dir}/${file}" "${url}"; then - err 'Failed to download "%s"' "${url}" + dbg 'Failed to download "%s"' "${url}" return 1 fi -- cgit v0.9.1