wmail: skip leading white-space in From: headers.
[dockapps.git] / wmradio / wmradio-remote
blob412635e28c8b27a03249dd468417de3bedd191d1
1 #!/bin/sh
3 PIPEPREFIX=/tmp/wmradio_
5 PIPE=${PIPEPREFIX}`id -u`
7 if [ "$1" = "" ] ; then
8 echo -e "Usage: $0 COMMAND [param]\n"\
9 "valid commands are:\n"\
10 " POWER\n"\
11 " TUNE_MINUS\n"\
12 " FINE_TUNE_MINUS\n"\
13 " TUNE_PLUS\n"\
14 " TUNE_NAME_NEXT\n"\
15 " TUNE_NAME_PREV\n"\
16 " FINE_TUNE_PLUS\n"\
17 " SET_PRESET\n"\
18 " SAVE_PRESET\n"\
19 " SCAN\n"\
20 " READ_CONFIG"
21 exit 1
23 if [ ! -p $PIPE ] ; then
24 echo "Pipe $PIPE doesn't exist! Is wmradio started?"
25 exit 1
29 case "$1" in
30 POWER|TUNE_MINUS|FINE_TUNE_MINUS|TUNE_PLUS|\
31 FINE_TUNE_PLUS|SCAN|TUNE_NAME_NEXT|TUNE_NAME_PREV|\
32 READ_CONFIG)
33 echo $1 >>$PIPE
35 SET_PRESET|SAVE_PRESET)
36 if [ "$2" = "" ] ; then
37 echo "wmradio-remote: command \"$1\" need an argument"
38 exit 1
40 echo $1 `expr $2 - 1` >>$PIPE
43 echo "wmradio-remote: invalid command \"$1\""
45 esac