+check_launch_factor() {
+ ./$FACTOR_BINARY "-e=USE: system 0 exit"
+ check_ret "Could not launch ./$FACTOR_BINARY"
+}
+
+is_boot_image_outdated() {
+ ./$FACTOR_BINARY "-e=USE: system \"\" to-refresh 2drop length 0 > 1 0 ? exit"
+ return $?
+}
+
+info_boot_image() {
+ prepare_build_info
+ if [[ -f $BOOT_IMAGE ]] ; then
+ get_url "$CHECKSUM_URL"
+ local factorcode_md5
+ factorcode_md5=$(grep "$BOOT_IMAGE" checksums.txt | cut -f2 -d' ')
+ set_md5sum
+ local disk_md5
+ disk_md5=$($MD5SUM "$BOOT_IMAGE" | cut -f1 -d' ')
+ $ECHO "Factorcode md5: $factorcode_md5";
+ $ECHO "Disk md5: $disk_md5";
+ if [[ "$factorcode_md5" == "$disk_md5" ]] ; then
+ $ECHO "Your disk boot image matches the one on downloads.factorcode.org."
+ else
+ $ECHO "Your disk boot image and the one on downloads.factorcode.org mismatch"
+ fi
+ fi
+
+ check_launch_factor
+ is_boot_image_outdated
+ if [[ $? -eq 0 ]]; then
+ $ECHO "Your disk boot image is up-to-date"
+ else
+ $ECHO "Your disk boot image needs to be updated"
+ fi
+}
+