--- /dev/null
+#!/bin/bash
+
+CUR=$PWD
+FROM=.
+BRANCH=HEAD
+
+while getopts ":f:b:" opt; do
+ case $opt in
+ f)
+ FROM=$OPTARG
+ ;;
+ b)
+ BRANCH=$OPTARG
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG" >&2
+ exit 1
+ ;;
+ :)
+ echo "Option -$OPTARG requires an argument." >&2
+ exit 1
+ ;;
+ esac
+done
+
+echo "From: "$FROM
+
+if [ ! -d $FROM ]; then echo $FROM" isn't a directory" && exit 0; fi
+
+cd $FROM
+if [ ! -e PKGBUILD ]; then "No PKGBUILD file found in "$FROM && exit 0; fi
+
+_realname=`cat PKGBUILD | grep _realname=`
+_basever=`cat PKGBUILD | grep _base_ver=`
+_pkgver=`cat PKGBUILD | grep pkgver=`
+_pkgrel=`cat PKGBUILD | grep pkgrel=`
+
+realname=${_realname:10}
+basever=${_basever:10}
+pkgver=${_pkgver:7}
+pkgrel=${_pkgrel:7}
+
+echo "realname: "$realname
+echo "basever: "$basever
+echo "pkgver: "$pkgver
+echo "pkgrel: "$pkgrel
+
+cd $realname
+
+git fetch
+
+git_list=$(git rev-list --count $BRANCH)
+git_parse=$(git rev-parse --short $BRANCH)
+
+echo "git_list: "$git_list
+echo "git_parse: "$git_parse
+
+pkgbuild_ver=$pkgver"-"$pkgrel
+git_ver=$basever"."$git_list"."$git_parse"-"$pkgrel
+
+echo "PKGBUILD ver: "$pkgbuild_ver
+echo "GIT ver: "$git_ver
+
+echo ""
+if [ "$pkgbuild_ver" != "$git_ver" ]; then
+ echo "TO BE BUILD"
+else
+ echo "Nothing to be build"
+fi
+
+cd $CUR