Forum Discussion
manoflinux
15 years agoVisitor
here is a program to package a script up and download the package from the "Application Packager" menu.
example use:
just replace roku01.local the ip of your roku if you dont have a name for it.
packageroku ()
{
uagent='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)';
ftime=$(($(date +'%s')*1000)) ;
if [ "$1" ] && [ "$2" ] && [ "$3" ] && [ ${#1} -lt 32 ]; then
purl=$(curl --silent --show-error --user-agent "$uagent" --form "app_name=$1" --form "passwd=$2" --form "pkg_time=$ftime" --form "mysubmit=Package" "http://$3/plugin_package" |grep "href"|grep -v "plugin_inspect\|plugin_install"|awk -F 'href="' '{ print $2 }'|tr '"' '\n'|head -n1 😉 ;
wget http://$3/$purl ;
else
echo -e "app name too large or two few arguments format is\npackageroku appname dev_password IPaddress_of_ROKU ";
fi
}
example use:
just replace roku01.local the ip of your roku if you dont have a name for it.
$delroku roku01.local
Delete Succeeded.
$uproku videoplayer.zip roku01.local
Application Received: 127030 bytes stored.
size on disk is 127030 bytes
$packageroku 'sample video player' 'your_dev_password' roku01.local
--2011-04-29 13:50:24-- http://roku01.local/pkgs/somepackage.pkg
Resolving roku01.local... 192.168.0.24
Connecting to roku01.local|192.168.0.24|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 130000 (127K) [text/plain]
Saving to: `somepackage.pkg'
100%[==========================================================================================>] 130,000 --.-K/s in 0.02s
2011-04-29 13:50:24 (5.25 MB/s) - `somepackage.pkg' saved [130000/130000]