From e051cf317b754650573d0d9ab1a5a67fa73479fd Mon Sep 17 00:00:00 2001 From: kmobs Date: Thu, 24 Jun 2010 22:36:11 -0500 Subject: [PATCH] Froyo backuptool in progress --- prebuilt/common/bin/backuptool.sh | 148 ++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100755 prebuilt/common/bin/backuptool.sh diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh new file mode 100755 index 00000000..2c47ec53 --- /dev/null +++ b/prebuilt/common/bin/backuptool.sh @@ -0,0 +1,148 @@ +#!/sbin/sh +# +# Backup and restore proprietary Android system files +# + +C=/tmp/backupdir +S=/system +V=CyanogenMod-6 + +PROCEED=1; + +check_prereq() { + if ( ! grep -q "^ro.modversion=.*$V.*" /system/build.prop ); + then + echo "Not backing up files from incompatible version."; + PROCEED=0; + fi +} + +check_installscript() { + if [ -f "/tmp/.installscript" ]; + then + echo "/tmp/.installscript found. Skipping backuptool." + PROCEED=0; + fi +} + +get_files() { + cat <