diff --git a/src/install/install.sh b/src/install/install.sh index 71eb345..3919258 100755 --- a/src/install/install.sh +++ b/src/install/install.sh @@ -13,10 +13,8 @@ if [ ! -f $FLAG_PATH ]; then echo "backing up" BAK_PATH=$TF1_PATH/bak mkdir -p $BAK_PATH - cp /misc/modules/gpio_keys_polled.ko $BAK_PATH cp /misc/boot_logo.bmp.gz $BAK_PATH cp /misc/kernel.dtb $BAK_PATH - cp /misc/uImage $BAK_PATH fi was_updated() { @@ -24,40 +22,36 @@ was_updated() { A_PATH=$FILE A_NAME=$(busybox basename "$A_PATH") B_PATH=$SYSTEM_PATH/dat/$A_NAME - + if [[ "$A_NAME" == "boot_logo.bmp.gz" ]]; then # we don't care if the user has changed their boot logo continue fi - + if [ ! -f "$B_PATH" ]; then continue fi - + A_SUM=$(busybox md5sum $A_PATH | busybox cut -d ' ' -f 1) B_SUM=$(busybox md5sum $B_PATH | busybox cut -d ' ' -f 1) - + if [[ "$A_SUM" != "$B_SUM" ]]; then return 0 fi done - + return 1 } if [ ! -f $FLAG_PATH ] || was_updated; then echo "updating misc partition" mount -o remount,rw /dev/block/actb /misc - rm -f /misc/uImage - cp $SYSTEM_PATH/dat/uImage /misc cp $SYSTEM_PATH/dat/dmenu.bin /misc if [ ! -f $FLAG_PATH ]; then # only replace boot logo on install not update! cp $SYSTEM_PATH/dat/boot_logo.bmp.gz /misc fi cp $SYSTEM_PATH/dat/kernel.dtb /misc - cp $SYSTEM_PATH/dat/gpio_keys_polled.ko /misc/modules touch $FLAG_PATH sync && reboot fi -