Last active
January 27, 2022 23:35
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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