summaryrefslogtreecommitdiff
path: root/cmd/updater/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/updater/update.sh')
-rwxr-xr-xcmd/updater/update.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/updater/update.sh b/cmd/updater/update.sh
index 136ce67d5..60fbe0561 100755
--- a/cmd/updater/update.sh
+++ b/cmd/updater/update.sh
@@ -196,8 +196,8 @@ function get_updater_url() {
# check to see if the binary updater exists. if not, it will automatically the correct updater binary for the current platform
function check_for_updater() {
- # check if the updater binary exist.
- if [ -f "${SCRIPTPATH}/updater" ]; then
+ # check if the updater binary exist and is not empty.
+ if [[ -s "${SCRIPTPATH}/updater" && -f "${SCRIPTPATH}/updater" ]]; then
return 0
fi
get_updater_url
@@ -245,7 +245,12 @@ function check_for_update() {
return 1
fi
- echo Latest Version = ${LATEST}
+ if [ -z ${LATEST} ]; then
+ echo "Failed to lookup latest release"
+ return 1
+ fi
+
+ echo "Latest Version = ${LATEST}"
if [ ${CURRENTVER} -ge ${LATEST} ]; then
if [ "${UPDATETYPE}" = "install" ]; then