caps-ctrl: use backticks, drop colors module.
authorMichael Prokop <mika@grml.org>
Sun, 28 Feb 2010 01:14:44 +0000 (02:14 +0100)
committerMichael Prokop <mika@grml.org>
Sun, 28 Feb 2010 01:14:44 +0000 (02:14 +0100)
debian/changelog
usr_bin/caps-ctrl

index 0694b19..112ff73 100644 (file)
@@ -1,3 +1,11 @@
+grml-scripts (1.2.9) UNRELEASED; urgency=low
+
+  * caps-ctrl: using $(...) instead of backticks and do not load
+    colors module any longer. Thanks to Alexander Steinböck.
+    [Closes: issue382]
+
+ -- Michael Prokop <mika@grml.org>  Sun, 28 Feb 2010 02:12:43 +0100
+
 grml-scripts (1.2.8) unstable; urgency=low
 
   * grml-setlang: do not set LC_CTYPE any longer.
index 8096e42..dfaec76 100755 (executable)
@@ -12,7 +12,6 @@ fi
 . /etc/grml/lsb-functions || ( alias einfo=echo ; alias eerror=echo; alias eend=echo )
 
 emulate zsh
-autoload -U colors ; colors
 
 if [[ -z $DISPLAY  ]] ; then # test if X is not running when calling us
          if [ $(id -u) != 0 ] ; then # test if user root did invoke this command
@@ -25,8 +24,8 @@ if [[ -z $DISPLAY  ]] ; then # test if X is not running when calling us
          ( einfo "caps-ctrl - switching caps lock and control key."
 
            loadkeys <<- EOT
-           keycode 58 = `repeat 15 echo -n 'Control '`
-           keycode 29 = `repeat 7 echo -n 'Caps_Lock '`
+           keycode 58 = $(repeat 15 echo -n 'Control ')
+           keycode 29 = $(repeat 7 echo -n 'Caps_Lock ')
                EOT
            eend $?
 
@@ -34,8 +33,8 @@ if [[ -z $DISPLAY  ]] ; then # test if X is not running when calling us
           einfo "caps-ctrl - switching caps lock and control key."
 
            loadkeys <<- EOT
-           keycode 58 = `repeat 15 echo -n 'Caps_Lock '`
-           keycode 29 = `repeat 7 echo -n 'Control '`
+           keycode 58 = $(repeat 15 echo -n 'Caps_Lock ')
+           keycode 29 = $(repeat 7 echo -n 'Control ')
                EOT
            eend $?
          )