File: lirc.sh

package info (click to toggle)
input-utils 1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 368 kB
  • sloc: ansic: 1,217; sh: 65; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 643 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/lirc.sh b/lirc.sh
index 2aec1fd..948a9d0 100755
--- a/lirc.sh
+++ b/lirc.sh
@@ -1,18 +1,18 @@
 #!/bin/sh
-INPUT="/usr/include/linux/input.h"
+INPUT="/usr/include/linux/input-event-codes.h"
 cat <<EOF
 begin remote
 	name linux-input-layer
 	bits 32
 	begin codes
 EOF
-awk "
+gawk '
 	/_MAX/			{ next };
 	/KEY_RESERVED/		{ next };
-	/#define (KEY|BTN)_/	{ gsub(/KEY_/,\"\",\$2);
-				  printf(\"\t\t%-20s 0x%04x\n\",
-					 \$2,0x10000+strtonum(\$3)) } 
-" < $INPUT
+	/#define (KEY|BTN)_/	{ gsub(/KEY_/,"",$2);
+				  printf("\t\t%-20s 0x%04x\n",
+					 $2,0x10000+strtonum($3)) } 
+' < $INPUT
 cat <<EOF
 	end codes
 end remote