[AppleTV2] Download nightly build script
#1
Because I keep my AppleTV2 pretty up2date I wrote a small script to make things easier for myself and thought I'd share it

This script will locate the latest nightly build and download it to /tmp on your appletv2. The actual (de)installation still has to be performed manually, maybe there will be an automagic install option in v 1.3 ;-)

To use:
ssh into your appletv2
install vim or nano
copy paste the code below into a new file
chmod +x <your file here>
./<your file here

Code:
#!/bin/bash
#############################################################################
# This script will download the latest nightly build of XBMC for AppleTV v2 #
# Author: Jeroen Stikkers  <> [email protected]                #
# Script version: 1.2                                                       #
#                                                                           #
# This script is provided As is and may be distributed and modified freely  #
#############################################################################

#Switching to /tmp
cd /tmp

#Declare the variables
TODAY=`date +%d`
URL=http://mirrors.xbmc.org/nightlies/darwin/atv2/

#Setting date to yesterday

if [ "$TODAY" == 01 ]; then
        if [ "`date +%m`" == "03" ];then
                TODAY=28
        else
                TODAY=30 #Yes, I'm lazy
        fi
fi

YEST=$[$TODAY-1]

#Because the 0 falls of during the bash arithmatic... if you find my 0's please call +31... :P
if [ "$YEST" -lt "10" ];then
        YEST=0$YEST
fi

YEST=`date +%Y%m`$YEST

#Setting up the URL
NIGHTLY=`curl -s $URL | grep $YEST | cut -d \" -f10`

#Downloading!
wget $URL$NIGHTLY
Reply

Logout Mark Read Team Forum Stats Members Help
[AppleTV2] Download nightly build script0