#!/bin/sh # update-rockbox.sh # # Run this script in the directory you have a fresh rockbox.zip in # # Edit this variable to point at your Rockbox target mount point: disk="/mnt/archos" zip="rockbox.zip" rbx="$disk/.rockbox" if test -f $zip; then newtarget=`unzip -p rockbox.zip .rockbox/rockbox-info.txt | grep Target:` oldtarget=`grep ^Target: $rbx/rockbox-info.txt` if test "x$newtarget" != "x$oldtarget"; then echo "WARNING: the previous install and this zip file disagrees" echo "WARNING: on target model: $oldtarget vs $newtarget!" exit fi else echo "no rockbox.zip in current dir" exit fi ver=`grep ^Version $rbx/rockbox-info.txt | cut "-d " -f2` # rename existing dir mv $rbx $rbx-$ver # unzip this version unzip $zip -d $disk # copy over the previous config to this fresh install cp $rbx-$ver/config.cfg $rbx