Skip to content

Instantly share code, notes, and snippets.

@chirayudesai
Created August 18, 2012 09:37
Show Gist options
  • Save chirayudesai/3385656 to your computer and use it in GitHub Desktop.
Save chirayudesai/3385656 to your computer and use it in GitHub Desktop.
#!/sbin/sh
#
# /system/addon.d/50-modem.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
vendor/modem.bin
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment