Skip to content

Instantly share code, notes, and snippets.

@dudewheresmycode
Last active January 27, 2022 23:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dudewheresmycode/53d03cf5ceb97786553b5e640b401647 to your computer and use it in GitHub Desktop.
A bash script to automate deploying test apps to Roku devices on the local network.
#!/bin/bash
BUILD_ID=$(date +"%s")
SRC_DIR="MyApp"
ZIP_FILE="dist/devbuild_$BUILD_ID.zip"
ROKU_URL="http://192.168.1.167"
ROKU_DEV_USER="rokudev"
ROKU_DEV_PW="******"
echo "Upload $ZIP_FILE to $ROKU_URL"
### Clean up
# rm dist/devbuild_*.zip
### Zip the file
(cd "$SRC_DIR" && zip -v -r -X "../$ZIP_FILE" . "*.DS_Store")
### Upload the zip to the Roku
curl --dump-header - -X POST \
--anyauth --user "$ROKU_DEV_USER:$ROKU_DEV_PW" \
-F "mysubmit=Replace" -F "archive=@$ZIP_FILE" \
"$ROKU_URL/plugin_install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment