arzzen/philips-tv

Incompatible with macOS

jannismain opened this issue · 1 comments

Issue

Getting errors on macOS due to dependency issues:

  • tr raises an error
❯ ./tv.sh currentChannel
tr: Illegal byte sequence
./tv.sh: line 70: $1: unbound variable
  • base64 raises an error (-d on linux corresponds to -D on macOS)
❯ ./tv.sh
<selected Option 1>
tr: Illegal byte sequence
Please enter 4 digit PIN code from your TV:
9969
base64: invalid option -- d
Usage:	base64 [-hvD] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -D, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)

Here, it seems a connection to the TV is established (Pin shows up on TV), but base64 crashes the script immediately afterwards.

I will try to help, when I get around to have a look at your source code. For now, let me just report these errors here for future reference!

Setup

Running macOS on most recent macOS Mojave 10.14.3.

  1. I have installed jq via brew
❯ brew install jq
❯ jq --version
jq-1.6
  1. I have cloned your repo and installed via sudo make install
  2. I have set the _TV_IP environment variable.

Fixed in #6