修复 iso 链接验证失败的问题

This commit is contained in:
bin456789 2023-06-20 22:17:31 +08:00
parent d32c83d1e6
commit dddb8eb49a
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -76,7 +76,8 @@ test_url() {
# 所以不用mime判断
# https://www.digipres.org/formats/sources/tika/formats/#application/gzip
real_type=$(file -b $tmp_file | cut -d' ' -f1 | tr '[:upper:]' '[:lower:]')
# 有些 file 版本输出的是 # ISO 9660 CD-ROM filesystem data ,要去掉开头的井号
real_type=$(file -b $tmp_file | sed 's/^# //' | cut -d' ' -f1 | tr '[:upper:]' '[:lower:]')
[ -n "$var_to_eval" ] && eval $var_to_eval=$real_type
if ! echo $expect_type | grep -wo "$real_type"; then