Hi everyone!
I’m new to Roku development and don’t have much experience with the language. I created a script to automate the deployment of my Roku app. It zips the app, sends it to the Roku device, and triggers the installation process. Here’s the script:
#!/bin/bash
WORKSPACE="app"
IP="YOUR ROKU IP"
PASSWORD="YOUR PASSWORD"
CURRENT_DIR=$(pwd)
ZIP_FILE="$CURRENT_DIR/app.zip"
if [ ! -d $WORKSPACE ]; then
echo "Error: '$WORKSPACE' directory not found."
exit 1
fi
cd $WORKSPACE && zip -r "$ZIP_FILE" . && cd "$CURRENT_DIR"
if [ ! -f "$ZIP_FILE" ]; then
echo "Error: app.zip not created."
exit 1
fi
response=$(curl -s -w "%{http_code}" -o /dev/null --digest -u "rokudev:$PASSWORD" \
-F "mysubmit=Install" \
-F "archive=@$ZIP_FILE" \
"http://$IP/plugin_install")
if [ "$response" -eq 200 ]; then
echo "Installation successful!"
telnet "$IP" 8085
else
echo "Error: response code $response"
fi
Is there any better or more automated way to deploy Roku apps directly, especially for development purposes? Since I’m new to this, I’d appreciate any suggestions or guidance! Thanks a lot!
