Kodi Community Forum
ATV2 and iOS nightly build semi automatic update scripts - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: iOS & tvOS (https://forum.kodi.tv/forumdisplay.php?fid=137)
+---- Thread: ATV2 and iOS nightly build semi automatic update scripts (/showthread.php?tid=108142)

Pages: 1 2 3 4


RE: ATV2 and iOS nightly build semi automatic update scripts - prynn - 2012-09-10

I tried to build the monthly for ATV2 and got it to work, just took your script and changed two lines, but here it is if someone needs it.
Code:
rm xbmcupmon.sh
echo '#!/bin/sh' >> ./xbmcupmon.sh
echo "xbmcdir=http://mirrors.xbmc.org/snapshots/darwin/atv2//" >> ./xbmcupmon.sh
echo "wget -q \$xbmcdir" >> ./xbmcupmon.sh
echo "xbmcdeb=\$(cat index.html | gawk 'match(\$0, \"<a href=\\\"(org.xbmc.xbmc-atv2_.*.0-0.*_iphoneos-arm.deb)\\\">\", a) {print a[1]}' | gawk 'NR==1{print $1}')"  >> ./xbmcupmon.sh
echo "rm index.html" >> ./xbmcupmon.sh
echo "wget \$xbmcdir/\$xbmcdeb" >> ./xbmcupmon.sh
echo "dpkg -i \$xbmcdeb" >> ./xbmcupmon.sh
echo "rm \$xbmcdeb" >> ./xbmcupmon.sh
chmod 755 ./xbmcupmon.sh

and then just run ./xbmcupmon.sh and u should be good.
Thanks for this wonderful script, durniplot.


RE: ATV2 and iOS nightly build semi automatic update scripts - danfozzy - 2012-09-11

(2012-09-10, 19:31)Hampfred Wrote: I tried to build the monthly for ATV2 and got it to work, just took your script and changed two lines, but here it is if someone needs it.
Code:
rm xbmcupmon.sh
echo '#!/bin/sh' >> ./xbmcupmon.sh
echo "xbmcdir=http://mirrors.xbmc.org/snapshots/darwin/atv2//" >> ./xbmcupmon.sh
echo "wget -q \$xbmcdir" >> ./xbmcupmon.sh
echo "xbmcdeb=\$(cat index.html | gawk 'match(\$0, \"<a href=\\\"(org.xbmc.xbmc-atv2_.*.0-0.*_iphoneos-arm.deb)\\\">\", a) {print a[1]}' | gawk 'NR==1{print $1}')"  >> ./xbmcupmon.sh
echo "rm index.html" >> ./xbmcupmon.sh
echo "wget \$xbmcdir/\$xbmcdeb" >> ./xbmcupmon.sh
echo "dpkg -i \$xbmcdeb" >> ./xbmcupmon.sh
echo "rm \$xbmcdeb" >> ./xbmcupmon.sh
chmod 755 ./xbmcupmon.sh

and then just run ./xbmcupmon.sh and u should be good.
Thanks for this wonderful script, durniplot.

That just downloaded the index.html file not the deb


RE: ATV2 and iOS nightly build semi automatic update scripts - prynn - 2012-09-11

What? It says in the terminal its downloading a deb, and installing it..

http://imgur.com/ncLKn

Image


RE: ATV2 and iOS nightly build semi automatic update scripts - akevit - 2012-11-16

Awesome script, thank you.

I wanted to practice my bash commands so if anyone is interested I wrote two one-liners for updating the latest nightly or snapshot:

Nightly:
Code:
xDir=xbmcdeb && URL=http://mirrors.xbmc.org/nightlies/darwin/atv2/ && snapshot=$(curl $URL | sed -n "s/.*\(xbmc.*deb\).*/\1/p" | sed -n 1p) && wget $URL$snapshot -P ./$xDir/ && dpkg -i ./$xDir/$snapshot && rm ./$xDir/$snapshot && reboot

Snapshot:
Code:
xDir=xbmcsnapshot && URL=http://mirrors.xbmc.org/snapshots/darwin/atv2/ && snapshot=$(curl $URL | sed -n "s/.*\(org.*deb\).*/\1/p" | sed -n 1p) && wget $URL$snapshot -P ./$xDir/ && dpkg -i ./$xDir/$snapshot && rm ./$xDir/$snapshot && reboot

These should work for any version of XBMC, it's just important that the code for snapshot is used for snapshots and nightly for nightlies (and correct URL placed in the URL=$() [with trailing backslash]). I'm not entirely sure how often or if ever they change the syntax of the file naming scheme for Snapshots and Nightlies, but I'm assuming that it doesn't [change] often. Snapshots depend on the filename beginning with org and Nightlies depend on the filename beginning with xbmc. -- See below -- updated so that same code can be used for any package, the correct URL just needs to be inputted


Also if you've ever wanted to see what version of XBMC you're running from the command line, this should give you some info:

Code:
dpkg -l | grep "XBMC M"

12.0-0~beta1 reports for nightlies, and 12.0-0~alpha7 for the latest snapshot.

Edit:
Redoing the search expression, the following code should work for any package. The URL just needs to be updated with the correct URL. The following has the URL for ATV2 Snapshots, all that would need to be changed is URL=http://mirrors.xbmc.org/nightlies/darwin/atv2/ to have it work for nightlies:
Code:
xDir=xbmcdeb && URL=http://mirrors.xbmc.org/snapshots/darwin/atv2/ && package=$(curl $URL | sed -n "s/.*\(f=.*.deb\).*/\1/p" | sed -n 1p | sed -e 's/<//' -e 's/f=\"//') && wget $URL$package -P ./$xDir/ && dpkg -i ./$xDir/$package && rm ./$xDir/$package && reboot