2009-10-05, 07:05
I hacked up some simple backup, getsvn download, and restore shell scripts for the ATV, I've tested them on my atv they work fine but of course I assume no liability if your atv blows up or anything else unexpected happens.
only one backup is maintained, any previous backup is removed before creating the new one.
when restoring, the old/bad build is removed and the backup is copied to the applicable folders. Also, make sure xbmc isn't running of course.
copy/create both scripts in the frontrow folder
make them both executable
create a backup folder "XBMC.bak" in the frontrow folder. If you don't create the XBMC.bak folder then nothing is backed up.
to run them, simply ssh and execute:
./backup.sh
./getsvn.sh 23524
./installtgz.sh XBMC_OSX_23524.tgz
./restore.sh
substitute the build# and filename as applicable, you can use any builld# available @ http://sshcs.com/xbmc/?mode=BO
./backup.sh
./getsvn.sh
./installtgz.sh is simply xbmc-9.04_update_sshcs.sh renamed (its autodownloaded if needed by getsvn.sh)
./restore.sh
only one backup is maintained, any previous backup is removed before creating the new one.
when restoring, the old/bad build is removed and the backup is copied to the applicable folders. Also, make sure xbmc isn't running of course.
copy/create both scripts in the frontrow folder
make them both executable
create a backup folder "XBMC.bak" in the frontrow folder. If you don't create the XBMC.bak folder then nothing is backed up.
to run them, simply ssh and execute:
./backup.sh
./getsvn.sh 23524
./installtgz.sh XBMC_OSX_23524.tgz
./restore.sh
substitute the build# and filename as applicable, you can use any builld# available @ http://sshcs.com/xbmc/?mode=BO
./backup.sh
Code:
#!/bin/sh
PW="frontrow"
# backup existing settings and app if .bak folder exist
if [ -d /Users/frontrow/XBMC.bak ]; then
echo "Backup folder found, removing any existing backup"
echo $PW | sudo -S rm -r /Users/frontrow/XBMC.bak/*
echo "Backing up XBMC.app folder this might take a few minutes"
cp -r /Users/frontrow/Applications/XBMC.app /Users/frontrow/XBMC.bak/XBMC.app
echo "Backing up application support/xbmc folder this might take a few minutes"
cp -r "/Users/frontrow/Library/Application Support/XBMC" "/Users/frontrow/XBMC.bak/XBMC"
echo "Backup finished"
fi
./getsvn.sh
Code:
#!/bin/sh
BUILD=$1
if [ ! $BUILD = "" ]; then
if [ ! -e "installtgz.sh" ]; then
echo "downloading update sshcs script to installtgz.sh"
wget "http://files.getdropbox.com/u/858897/XBMC/xbmc-9.04_update_sshcs.sh"
mv xbmc-9.04_update_sshcs.sh installtgz.sh
chmod +x installtgz.sh
fi
echo "Downloading OSX build $BUILD..."
wget "http://www.sshcs.com/xbmc/inc/EVA.asp?mode=NDLC&FN=OSX&BN=$BUILD"
echo "If the download completed successfully,"
echo "To install execute ./installtgz.sh and the filename of the tgz file"
echo "make sure XBMC is NOT running of course, and you may want to backup your existing first"
else
echo "No build# included, please try again with a valid build#"
fi
./installtgz.sh is simply xbmc-9.04_update_sshcs.sh renamed (its autodownloaded if needed by getsvn.sh)
./restore.sh
Code:
#!/bin/sh
PW="frontrow"
# restore existing settings and app if .bak folder exist
if [ -d /Users/frontrow/XBMC.bak/XBMC.app ]; then
echo "Backup app folder found, removing current XBMC.app"
echo $PW | sudo -S rm -r /Users/frontrow/Applications/XBMC.app
echo "Restoring backup XBMC.app to Applications/XBMC.app"
cp -r /Users/frontrow/XBMC.bak/XBMC.app /Users/frontrow/Applications/XBMC.app
echo "app restore finished"
fi
if [ -d /Users/frontrow/XBMC.bak/XBMC ]; then
echo "Backup user folder found, removing current settings"
echo $PW | sudo -S rm -r "/Users/frontrow/Library/Application Support/XBMC"
echo "Restoring backup settings to Application Support"
cp -r "/Users/frontrow/XBMC.bak/XBMC" "/Users/frontrow/Library/Application Support/XBMC"
echo "settings retore finished"
fi