From 1d36cf530b77105d1b844b5b2ca28525576a86ef Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 10 Mar 2018 19:39:12 +0800 Subject: Fix get_latest_image() to return _md5 correctly --- dfly-update | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dfly-update b/dfly-update index c76d45e..beb9f8a 100755 --- a/dfly-update +++ b/dfly-update @@ -81,7 +81,7 @@ get_local_version() { # Get the latest remote system image # Returns: -# "_filename=; _md5=" +# "_filename=''; _md5=''" get_latest_image() { local latest_filename latest_md5 line if [ "${branch}" = "DEVELOPMENT" ]; then @@ -102,8 +102,9 @@ get_latest_image() { fgrep -v 'gui-' | tail -n 1) fi latest_filename=$(echo "${line}" | awk -F'[()]' '{ print $2 }') - latest_md5=$(echo "${line}" | awk '{ print $5 }') + latest_md5=$(echo "${line}" | awk '{ print $4 }') rm -f ${tmpchecksum} + debug "_filename='${latest_filename}'; _md5='${latest_md5}'" echo "_filename='${latest_filename}'; _md5='${latest_md5}'" } -- cgit v1.2.2