summaryrefslogtreecommitdiffstats
path: root/keymaps/updkmaps
blob: df9766a1174821de05dd8624f46799e5b2bceda1 (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
30
31
32
#!/bin/sh

ARCH=$1
if [ -z "$ARCH" ]; then
    echo "usage: $0 <arch>"
    exit 1
fi

TMPDIR=/tmp/keymaps.$$
TOPDIR=`pwd`

rm -rf $TMPDIR
mkdir -p $TMPDIR

if [ $ARCH = "sparc" ]; then
    PATTERN="{i386,sun}"
else
    PETTERN="i386"
fi

find /usr/lib/kbd/keymaps/$PATTERN -name "*.kmap*" | while read n; do
    /usr/bin/loadkeys `basename $n .gz`
    ../utils/readmap $TMPDIR/`basename $n .kmap.gz`.kmap
done

loadkeys us

rm -f $TMPDIR/defkeymap* $TMPDIR/ANSI* $TMPDIR/lt.kmap

(cd $TMPDIR; $TOPDIR/../utils/mapshdr *.kmap) > $TMPDIR/hdr
cat $TMPDIR/hdr $TMPDIR/*.kmap | gzip -9 > keymaps-$ARCH
rm -rf $TMPDIR