#!/bin/sh

ECHO="echo"
if [ $# = 1 ]
then 
  export TEXTDOMAIN=console-tools
  if [ -x /usr/bin/gettext ]; then
    ECHO="gettext -s"
  else
    ECHO="echo"
  fi
fi
if [ ! -x /usr/sbin/install-keymap ]
then
   $ECHO "Error: kbdconfig depends on the package console-common being installed."
   $ECHO "    please run 'aptitude install console-common"
   exit 1
fi
if [ "$@" = "--version" ]
then
	VERS=`dpkg -l console-common |  grep console-common | cut -c 20-30`
	$ECHO "kbdconfig (console-common): ${VERS}"
	exit 0
fi
if [ "$@" = "--help" ]
then
	$ECHO "Usage: kbdconfig "
	$ECHO "kbdconfig is a wrapper for dpkg-reconfigure console-common"
	exit 0
fi
else
  /usr/sbin/dpkg-reconfigure console-common
fi
