mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 12:37:20 +01:00
feat: Add option to disable shared folder shortcuts (#1928)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user