5 if [ "$1" = "--help" ]; then
6 echo "${progname}: converts irman.conf to lirc config file"
8 echo "usage: ${progname} [file]"
9 echo " where \`file' is the full file name of your irman.conf"
10 echo " (default /usr/local/etc/irman.conf)"
14 irmanconf
=${1:-/usr/local/etc/irman.conf}
15 if [ ! -f ${irmanconf} ]; then
16 echo "cannot find ${irmanconf}. try ${progname} --help"
20 echo "# lircd.conf automatically generated by ${progname}"
27 echo "# devices: remotes from ${irmanconf}"
28 grep bind ${irmanconf} |
sed 's/^[ \t]*bind[ \t]\+\([^- \t]\+-[^-]\+\)-.*$/\1/' |
29 sort |
uniq |
sed 's/^/# /'
56 grep '^[ ]*bind' ${irmanconf} |
60 if [ "x$bind" = "xbind" -a -n "$code" -a -n "$name" ]; then
61 code
=`echo "${code}000000000000" | cut -c1-12`
62 echo " ${name} 0x0000${code}"