#!/bin/sh
progdir=`dirname "$0"`
a=`cksum /misc/kernel.dtb`
b=${a%% *}
for file in /misc/dtbs/*
do
	c=`cksum ${file}`
	d=${c%% *}
	if [ $b == $d ]
	then
		batt=`basename $file .dtb`
		$progdir/batt/printstr " 当前容量为: ${batt} "
		sleep 2
		sync
		exit 0
	fi
done
$progdir/batt/printstr " 无法识别当前的 kernel.dtb 文件 "
sleep 2
