summaryrefslogtreecommitdiffstats
path: root/PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh
blob: 0d72681bbd0f5bf8c05130aaefc846c18483ce0c (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
33
#!/bin/sh

FOUND="0"

# Lets parse the xorg.list file, and see what models are supported
while read line
do

  if [ "$FOUND" = "1" -a ! -z "$line" ]
  then
    echo $line | grep '! ' >/dev/null 2>/dev/null
    if [ "$?" = "0" ]
    then
     exit 0
    else 
      model="`echo $line | sed 's|(|[|g'`"
      model="`echo $model | sed 's|)|]|g'`"
      echo "$model"
    fi 
  fi 

  if [ "${FOUND}" = "0" ]
  then
    echo $line | grep '! model' >/dev/null 2>/dev/null
    if [ "$?" = "0" ]
    then
      FOUND="1"
    fi 
  fi

done < /usr/local/share/X11/xkb/rules/xorg.lst

exit 0
OpenPOWER on IntegriCloud