#!/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 " The current battery capacity: ${batt} "
		sleep 2
		sync
		exit 0
	fi
done
$progdir/batt/printstr " Unable to recognize the current kernel.dtb file "
sleep 2
