jf-roku/dev_upload.sh

22 lines
854 B
Bash
Raw Normal View History

2019-02-23 03:14:56 +00:00
#!/bin/bash
if [ -z "$ROKU_DEV_PASSWORD" ]; then
echo "You need to set ROKU_DEV_PASSWORD:"
echo "export ROKU_DEV_PASSWORD=<your dev password>"
exit 1
fi
if [ -z "$ROKU_DEV_TARGET" ]; then
echo "You need to set ROKU_DEV_TARGET:"
echo "export ROKU_DEV_TARGET=<your roku ip>"
exit 1
fi
2019-03-14 17:27:23 +00:00
# My roku crashes if I try to upload with screensaver on. Always wake first
curl -d "" http://$ROKU_DEV_TARGET:8060/keypress/home
2019-03-02 22:28:46 +00:00
[ -f jellyfin-roku.zip ] && rm jellyfin-roku.zip
zip jellyfin-roku.zip manifest -r ./components -r ./source -r ./images
2019-02-23 03:14:56 +00:00
curl -f -sS --user rokudev:$ROKU_DEV_PASSWORD --anyauth -F "mysubmit=Install" -F "archive=@jellyfin-roku.zip" -F "passwd=" http://$ROKU_DEV_TARGET/plugin_install \
| python -c 'import sys, re; print("\n".join(re.findall("<font color=\"red\">(.*?)</font>", sys.stdin.read(), re.DOTALL)))'