freebsd-ports/misc/sonytv/scripts/configure
Pav Lucistnik a194c9df9d Add sonytv, an infrared remote control for SONY TV sets, written in Tk.
PR:		ports/58263
Submitted by:	Eric P. Scott <eps+psub0306@ana.com>
2003-12-30 15:05:05 +00:00

22 lines
560 B
Bash

#!/bin/sh
cd ${WRKSRC:?Uh-oh.}||exit 1
umask 022
/usr/bin/dialog \
--title "Where's your IR device?" \
--radiolist "Select a serial port:" 12 48 4 \
/dev/cuaa0 "" off \
/dev/cuaa1 "e.g. Toshiba Libretto" off \
/dev/cuaa2 "e.g. Sony VAIO F-series" on \
/dev/cuaa3 "" off \
2>.portstmp.$$
case $? in
0) read device <.portstmp.$$
for f in sonytv sonytv+
do
${SED} -e "/set device {/s;{.*};{${device}};" $f >.portstmp.$$
/usr/bin/cmp -s .portstmp.$$ $f||${CP} .portstmp.$$ $f
done
${RM} -f .portstmp.$$ ;;
*) ${RM} -f .portstmp.$$
exit 1 ;;
esac