#!/bin/sh # ckbcomp-mini -- convert XKB specification to keymap for loadkeys # Copyright © 2006 Anton Zinoviev # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # If you have not received a copy of the GNU General Public License # along with this program, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Default values: ekmapdir=/usr/share/console-setup-mini model=pc105 layout='' variant='' options='' verbose_option=no # The same as /usr/bin/which - in order to make "which" available in # environments where "which" does not exist which () { local IFS IFS=: for i in $PATH; do if [ -x "$i/$1" ]; then echo "$i/$1" return 0 fi done return 1 } while [ "$1" ]; do case "$1" in -I*) ekmapdir=${1#-I} ;; -model) shift model="$1" ;; -layout) shift layout="$1" ;; -variant) shift variant="$1" ;; -option) shift options=$(echo $options $1 | sed 's/,/ /g') ;; -\?|-help) cat >&2 < [ [