From: Michael Prokop Date: Mon, 29 Mar 2010 07:00:19 +0000 (+0200) Subject: Fix tabs inside caps-ctrl. X-Git-Tag: v1.3.1^0 X-Git-Url: http://git.grml.org/?p=grml-scripts-core.git;a=commitdiff_plain;h=68b6fa1359d75e8060f778a8d98584a1a5b2c5c9 Fix tabs inside caps-ctrl. --- diff --git a/debian/changelog b/debian/changelog index e5d2127..b24c66e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-scripts (1.3.1) unstable; urgency=low + + [ Matthias Kopfermann ] + * Fix tabs inside caps-ctrl. + + -- Michael Prokop Mon, 29 Mar 2010 08:59:44 +0200 + grml-scripts (1.3.0) unstable; urgency=low [ Matthias Kopfermann ] diff --git a/usr_bin/caps-ctrl b/usr_bin/caps-ctrl index b4bd3cc..824ddd1 100755 --- a/usr_bin/caps-ctrl +++ b/usr_bin/caps-ctrl @@ -7,15 +7,15 @@ ################################################################################ if [[ -f /etc/grml/script-functions ]] ; then - source /etc/grml/script-functions \ - && check4progs xmodmap loadkeys dumpkeys + source /etc/grml/script-functions && \ + check4progs xmodmap loadkeys dumpkeys || exit 1 fi if [[ -f /etc/grml/lsb-functions ]] ; then - source /etc/grml/lsb-functions + source /etc/grml/lsb-functions else - einfo() { echo "$*" ; } - eerror() { echo "$*" ; } - eend() { echo "$*" ; } + einfo() { echo "$*" ; } + eerror() { echo "$*" ; } + eend() { echo "$*" ; } fi emulate zsh @@ -33,7 +33,7 @@ if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us loadkeys <<- EOT keycode 58 = $(repeat 15 echo -n 'Control ') keycode 29 = $(repeat 7 echo -n 'Caps_Lock ') - EOT + EOT eend $? ) || ( @@ -42,7 +42,7 @@ if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us loadkeys <<- EOT keycode 58 = $(repeat 15 echo -n 'Caps_Lock ') keycode 29 = $(repeat 7 echo -n 'Control ') - EOT + EOT eend $? ) @@ -54,7 +54,7 @@ else # running under X xmodmap -pke | grep 'Caps_Lock' > /dev/null || ( xmodmap - <<- EOT keycode 66 = Caps_Lock - EOT + EOT ) xmodmap - <<- EOT @@ -70,7 +70,7 @@ else # running under X add lock = Caps_Lock add Control = Control_L !add Control = Control_R - EOT + EOT eend $? ) fi # end of test if X or console is used