]> granicus.if.org Git - libvpx/commitdiff
decode_to_md5.sh: fix local md5 variable assignment
authorJames Zern <jzern@google.com>
Wed, 30 Jul 2014 17:50:01 +0000 (10:50 -0700)
committerJames Zern <jzern@google.com>
Wed, 30 Jul 2014 17:50:01 +0000 (10:50 -0700)
extract only the md5 + quote the result
fixes:
test/examples.sh: 47: local: img-176x144-0029.i420: bad variable name

Change-Id: I81c6a83c8a4e792a520fd7046c8eedcbd4af9a0c

test/decode_to_md5.sh

index 6cb7d0e6e572e1b02d8f605b4fd71b4a7b65b9e0..854b74f84f181eea4b09d210698e5a4a26e6e7be 100755 (executable)
@@ -44,8 +44,8 @@ decode_to_md5() {
 
   [ -e "${output_file}" ] || return 1
 
-  local md5_last_frame=$(tail -n1 "${output_file}")
-  local actual_md5=$(echo "${md5_last_frame% *}" | tr -d [:space:])
+  local md5_last_frame="$(tail -n1 "${output_file}" | awk '{print $1}')"
+  local actual_md5="$(echo "${md5_last_frame}" | awk '{print $1}')"
   [ "${actual_md5}" = "${expected_md5}" ] || return 1
 }