aboutsummaryrefslogtreecommitdiff
path: root/misc/sonytv/scripts/configure
diff options
context:
space:
mode:
Diffstat (limited to 'misc/sonytv/scripts/configure')
-rw-r--r--misc/sonytv/scripts/configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/misc/sonytv/scripts/configure b/misc/sonytv/scripts/configure
new file mode 100644
index 000000000000..4b94f0cf1fa1
--- /dev/null
+++ b/misc/sonytv/scripts/configure
@@ -0,0 +1,22 @@
+#!/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