View Single Post
  #57  
Old July 22nd, 2009, 04:07 PM
dustywilson dustywilson is offline
Junior Member
 
Join Date: Jul 2009
Posts: 1
Post Automatic installer/updater script

This is my solution for automatically installing and/or upgrading Boxee for 64-bit Ubuntu. I tested this in fully-upgraded Jaunty. No promises otherwise. Just run this once in awhile and it'll take care of you.

Save the following as a bash script in some new file (I named mine "boxeeinstall.sh") and set it to be executable (chmod 755 boxeeinstall.sh). Run it as a non-root user that can use sudo.

If you don't have getlibs installed, it'll install it. It uses wget. I think that's available by default in both Intrepid and Jaunty. If not, install that.

You'll have to type "y" and press enter on the getlibs step if necessary. (Is there a way to auto-yes that?)

Code:
#!/bin/bash

if [ "`which getlibs`" == "" ]; then
  wget -O /tmp/getlibs-all-$$.deb http://frozenfox.freehostia.com/cappy/getlibs-all.deb
  sudo dpkg -i /tmp/getlibs-all-$$.deb
  rm /tmp/getlibs-all-$$.deb
fi

wget -qO /tmp/boxee-packages-$$.gz http://apt.boxee.tv/dists/jaunty/main/binary-i386/Packages.gz
LATEST=`zgrep Version /tmp/boxee-packages-$$.gz | awk '{v=0; for (i = 1; i <= NF; i++) if ($2 > v) v = $2}; END {print v}'`
echo "LATEST: $LATEST"
CURRENT=`dpkg -s boxee 2> /dev/null | awk '/Version/ {print $2}'`
echo "CURRENT: $CURRENT"

if [ "$LATEST" != "$CURRENT" ]; then
  wget -O /tmp/boxee-$$.deb http://apt.boxee.tv/`zgrep Filename /tmp/boxee-packages-$$.gz | tail -n1 | awk '{print $2}'`
  sudo dpkg -i --force-all /tmp/boxee-$$.deb
  rm /tmp/boxee-$$.deb
  getlibs /opt/boxee/Boxee
fi

rm /tmp/boxee-packages-$$.gz
Reply With Quote