feat: Add option to disable shared folder shortcuts (#1928)

This commit is contained in:
Kroese
2026-07-21 18:46:45 +02:00
committed by GitHub
parent ef5ce4ad65
commit 21d628e924
3 changed files with 17 additions and 1 deletions
+15
View File
@@ -604,6 +604,21 @@ updateXML() {
sed -i "s|</UserData>| <ProductKey>\n <Key>$key</Key>\n <WillShowUI>OnError</WillShowUI>\n </ProductKey>\n </UserData>|g" "$asset" || return 1
fi
if disabled "$SHORTCUT" || disabled "$SAMBA"; then
if ! sed -i -E '
/<SynchronousCommand([[:space:]>])/ {
:command
N
/<\/SynchronousCommand>/!b command
/<Description>Create desktop shortcut to shared folder<\/Description>/d
/<Description>Map shared folder<\/Description>/d
}
' "$asset"; then
error "Failed to remove shared folder shortcuts from answer file!"
return 1
fi
fi
if ! xmllint --nonet --noout "$asset"; then
error "The generated answer file is not valid XML!"
return 1