mirror of
https://github.com/dockur/windows.git
synced 2026-07-07 05:07:26 +01:00
fix: Improve ESD image parsing (#1812)
This commit is contained in:
+4
-4
@@ -589,22 +589,22 @@ getESD() {
|
||||
|
||||
echo "$result" > "$dir/$eFile"
|
||||
|
||||
local tag="FilePath"
|
||||
ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||
tag="FilePath"
|
||||
ESD=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" 2>/dev/null | sed -E -e "s/<[\/]?$tag>//g" || true)
|
||||
|
||||
if [ -z "$ESD" ]; then
|
||||
error "Failed to find ESD URL in $eFile!" && return 1
|
||||
fi
|
||||
|
||||
tag="Sha1"
|
||||
ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||
ESD_SUM=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" 2>/dev/null | sed -E -e "s/<[\/]?$tag>//g" || true)
|
||||
|
||||
if [ -z "$ESD_SUM" ]; then
|
||||
error "Failed to find ESD checksum in $eFile!" && return 1
|
||||
fi
|
||||
|
||||
tag="Size"
|
||||
ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" | sed -E -e "s/<[\/]?$tag>//g" 2>/dev/null)
|
||||
ESD_SIZE=$(xmllint --nonet --xpath "//$tag" "$dir/$eFile" 2>/dev/null | sed -E -e "s/<[\/]?$tag>//g" || true)
|
||||
|
||||
if [ -z "$ESD_SIZE" ]; then
|
||||
error "Failed to find ESD filesize in $eFile!" && return 1
|
||||
|
||||
Reference in New Issue
Block a user