#!/bin/bash echo "Тест получения названия MSVSphere ОС из ISO образа" echo "==================================================" echo "" source ../../library/sh_lib.sh check=0 ISO_IMAGES_URLS_FILE='files/msvsphereiso_url.txt' EXPECTED_MESSAGE="Media is bootable. Media is an installer for OS 'MSVSphere 9 (x86_64)'" while read LINE; do curl -LJs -r 0-1048576 -o img.iso $LINE OUTPUT="$(/usr/bin/osinfo-detect img.iso 2>&1)" [[ "$OUTPUT" == "$EXPECTED_MESSAGE" ]] check=$(eq_is_success ${check} 0) echo "RESULT: File: $LINE; Result: $check" rm -f img.iso done < $ISO_IMAGES_URLS_FILE check_test_status ${check} "$0" exit ${check}