blob: 1c1f24d1e5ee8198f8a60fbd3f15eebf75b8396d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash
set -euo pipefail
cd /usr/share/X11/xkb/rules
if grep us_da evdev.xml > /dev/null; then
exit
fi
echo "Adding us_da layout to evdev.xml"
read -r -d '' layout <<EOF || true
<!-- BEGIN us_da -->
<layout>
<configItem>
<name>us_da</name>
<shortDescription>us_da</shortDescription>
<description>English (US, with Danish letters)</description>
<languageList>
<iso639Id>eng</iso639Id>
<iso639Id>dan</iso639Id>
</languageList>
</configItem>
</layout>
<!-- END us_da -->
EOF
awk -v layout="$layout" '{ print } /<layoutList>/ { print layout }' evdev.xml | sponge evdev.xml
|