mirror of
https://github.com/bin456789/reinstall.git
synced 2025-03-19 05:39:31 +08:00
修复 iso 链接验证失败的问题
This commit is contained in:
parent
d32c83d1e6
commit
dddb8eb49a
@ -76,7 +76,8 @@ test_url() {
|
|||||||
# 所以不用mime判断
|
# 所以不用mime判断
|
||||||
# https://www.digipres.org/formats/sources/tika/formats/#application/gzip
|
# 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
|
[ -n "$var_to_eval" ] && eval $var_to_eval=$real_type
|
||||||
|
|
||||||
if ! echo $expect_type | grep -wo "$real_type"; then
|
if ! echo $expect_type | grep -wo "$real_type"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user