#!/bin/sh

function log() {
    echo "`date +"%D %T"` $1" >> /var/log/myupdate.log
}

log "Update starting..."
cd /tmp && wget tom.linux-sunxi.org/misc/ota/update.tgz || log "Download error" && exit 1

tar xzf update.tgz || log "Uncompress error && exit 1"
md5sum -c < mymount.md5 | xargs log


