Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  updating rockbox from osx...
« previous next »
  • Print
Pages: [1]

Author Topic: updating rockbox from osx...  (Read 1394 times)

Offline lbm

  • Member
  • *
  • Posts: 5
updating rockbox from osx...
« on: October 15, 2006, 01:07:34 AM »
...can be a pain if you wan't to do it with the finder because of the hidden files. So I started a small script. Don't know really where to put it so I'll put it in the general discussion.

Maybe someone sophisticated with apple scripts can use it to make it fancy or it might be adopted for linux users or whatever. And I don't know the time of the builds on the rockbox-server so maybe someone wants to get the timezone thing straight :).

Code: [Select]
#!/bin/bash
#
# install the newest (when the date thingy works) rockbox daily build on the player

declare -i MYTIMEZONE

# please set your timezone and the name of your device
MYTIMEZONE=+2
DEVICENAME=IAUDIO # actually this is the mountpoint - the apple automounter uses the "harddisk name"
DEVICE=iaudiox5 # and this is more or less the download-filename

MYTIMEZONE=$MYTIMEZONE*3600

FILENAME=rockbox-$DEVICE-`perl -e '@T=gmtime(time-82800+$MYTIMEZONE);printf("20%02d%02d%02d",($T[5]+1900)%100,$T[4]+1,$T[3])'`.zip
# and here is a looot to improve but my shellscripting skills are not that good :)

if [ ! -f $FILENAME ]; then
        echo "Rockbox file does not exist. Trying to download $FILENAME"
        wget --quiet http://download.rockbox.org/daily/iaudiox5/$FILENAME
fi
if [ -f $FILENAME ]; then
        if [ -d /Volumes/$DEVICENAME/ ]; then
                echo "Now extracting the new version to your iAudio device..."
                unzip -oqd /Volumes/$DEVICENAME/ $FILENAME
                ERROR=$?
                if [ $ERROR -eq 0 ]; then
                        echo "Rockbox updated and installed sucessfully."
                        rm $FILENAME
                        echo "Local version of $FILENAME deleted."
                else
                        echo "An unknown error occured unzipping the file."
                        echo "File $FILENAME has been kept."
                fi
        else
                echo "iAudio not connected..."
                echo "The downloaded file has been kept."
                echo "Rerun this script to install to device and"
                echo "delete the file."
        fi
else
        echo "File could not be downloaded..."
        echo "Maybe you want to try again later."
fi

Or maybe it is complety unuseful for everybody, but I think it makes updating a bit more comfortable ;) and maybe one want's to add some neat tricks to it (like preserving the config file or stuff like that) because right now it is just an idea and not a cool rockbox updater implemenation.

Cheers, Thorsten
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: updating rockbox from osx...
« Reply #1 on: October 15, 2006, 03:01:15 AM »
Why don't you put this in the wiki? I think that's a better place to put this in ;)
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  updating rockbox from osx...
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.063 seconds with 15 queries.