#!/bin/sh
 if [ ! -f "/sdcard/upd/rb/rtupdateagent" ]; then
 cp /system/bin/ota/rtupdateagent /sdcard/upd/rb/rtupdateagent 
 fi 
 if [ $1 = "test" ]; then
 echo 'Starting resources delta test.. ' > /sdcard/upd/rb_resources.log
 /sdcard/upd/rb/rtupdateagent -op=test -delta=/sdcard/upd/rb/resources_CHS161218-14__ALL180104-15.delta -fspart=system -result=/sdcard/upd/rtupdateresult.txt -verbose=1 -logfile=/sdcard/upd/rb_resources.log -reboot=0
 else
 mount -o rw,remount /system
 echo 'Starting resources update.. ' > /sdcard/upd/rb_resources.log
 /sdcard/upd/rb/rtupdateagent -delta=/sdcard/upd/rb/resources_CHS161218-14__ALL180104-15.delta -fspart=system -result=/sdcard/upd/rtupdateresult.txt -op=update -verbose=1 -logfile=/sdcard/upd/rb_resources.log -reboot=0
 mount -o ro,remount /system
 fi

