blob: 937e56238c26358a0663c94620ebb7fcd4b5404e [file] [log] [blame]
#!/bin/sh
RC_PIPE=/tmp/rc_pipe
if [ $# -eq 0 -o "$1" = "-h" ]; then
echo ""
echo "Usage: rc <keystr> [<keystr>...]"
echo ""
echo " Feed RC key presses into soft_rc"
echo ""
echo " Special macro: <abc> -> DIGIT_a DIGIT_b DIGIT_c OK"
echo ""
echo " Examples:"
echo " rc guide"
echo " rc up up up ok"
echo " rc info"
echo " rc exit"
echo " rc 308"
echo ""
echo " Supported keys (soft_rc -k):"
soft_rc -k | sed -e 's/^/ /'
echo ""
exit 0
fi
if is-tv-box; then
if [ -e $RC_PIPE ]; then
echo "$@" > $RC_PIPE
else
echo "Error - $RC_PIPE doesn't exist!"
exit 1
fi
else
echo "Error - $0 only works on the TV box!"
exit 2
fi
exit 0