mirror of
https://github.com/dockur/windows.git
synced 2026-08-24 15:48:59 +01:00
fix: Preserve product key structure in answer files (#2066)
This commit is contained in:
+9
-2
@@ -1184,8 +1184,15 @@ removeEmbeddedProductKeys() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -z "$delete_xpath" ] || delete_xpath+=" | "
|
if [[ "$child_key" =~ ^[A-Za-z0-9]{5}(-[A-Za-z0-9]{5}){4}$ ]]; then
|
||||||
delete_xpath+="($product_keys)[$position]"
|
[ -z "$delete_xpath" ] || delete_xpath+=" | "
|
||||||
|
delete_xpath+="($product_keys)[$position]/u:Key[normalize-space(.)][1]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$direct_key" =~ ^[A-Za-z0-9]{5}(-[A-Za-z0-9]{5}){4}$ ]]; then
|
||||||
|
[ -z "$delete_xpath" ] || delete_xpath+=" | "
|
||||||
|
delete_xpath+="($product_keys)[$position]/text()[normalize-space()][1]"
|
||||||
|
fi
|
||||||
done <<< "$records"
|
done <<< "$records"
|
||||||
|
|
||||||
[ -n "$delete_xpath" ] || return 0
|
[ -n "$delete_xpath" ] || return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user