cvsdist 32b2036
Output terminal control sequences only when output is a terminal.
cvsdist 32b2036
cvsdist 32b2036
--- kbd-1.08/src/unicode_start	2002-11-22 19:23:00.000000000 -0500
cvsdist 32b2036
+++ kbd-1.08/src/unicode_start	2002-11-22 19:24:34.000000000 -0500
cvsdist 32b2036
@@ -1,4 +1,4 @@
cvsdist 32b2036
-#!/bin/sh
cvsdist 32b2036
+#!/bin/bash
cvsdist 32b2036
 # Enables Unicode processing in the current console.
cvsdist 32b2036
 #
cvsdist 32b2036
 # 1. The input side: the keyboard driver.
cvsdist 32b2036
@@ -25,7 +25,9 @@
cvsdist 32b2036
 # Tell the console output driver that the bytes arriving are UTF-8
cvsdist 32b2036
 # encoded multibyte sequences.
cvsdist 32b2036
 
cvsdist 32b2036
-echo -n -e '\033%G'
cvsdist 32b2036
+if test -t 1 -a -t 2 ; then
cvsdist 32b2036
+	echo -n -e '\033%G'
cvsdist 32b2036
+fi
cvsdist 32b2036
 
cvsdist 32b2036
 # Tell the graphics card how to display Unicode characters not
cvsdist 32b2036
 # contained in the IBM 437 character set (on PCs). The font should
cvsdist 32b2036
--- kbd-1.08/src/unicode_stop	2002-11-22 19:23:30.000000000 -0500
cvsdist 32b2036
+++ kbd-1.08/src/unicode_stop	2002-11-22 19:24:15.000000000 -0500
cvsdist 32b2036
@@ -1,4 +1,6 @@
cvsdist 32b2036
 #!/bin/sh
cvsdist 32b2036
 # stop unicode
cvsdist 32b2036
 kbd_mode -a
cvsdist 32b2036
-echo -n -e '\033%@'
cvsdist 32b2036
+if test -t ; then
cvsdist 32b2036
+	echo -n -e '\033%@'
cvsdist 32b2036
+fi