From df6e110f444efd877b5c80d47cb09b9c9be65fef Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 19 Jan 2010 13:51:15 +0300 Subject: [PATCH] Help kchecker and wine_checker.sh find the smatch binary If you are calling it from the smatch_scripts directory then use the development version. If it is not in the smatch_scripts directory hopefully you have done a "make install" and smatch is in your path. Signed-off-by: Dan Carpenter --- smatch_scripts/kchecker | 11 ++++++++++- smatch_scripts/wine_checker.sh | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/smatch_scripts/kchecker b/smatch_scripts/kchecker index 939beb68..c0735abb 100755 --- a/smatch_scripts/kchecker +++ b/smatch_scripts/kchecker @@ -5,7 +5,16 @@ function useage { exit 1 } -CMD=smatch +SCRIPT_DIR=$(dirname $0) +if [ -e $SCRIPT_DIR/../smatch ] ; then + CMD=$SCRIPT_DIR/../smatch +elif which smatch | grep smatch > /dev/null ; then + CMD=smatch +else + echo "Smatch binary not found." + exit 1 +fi + POST="--project=kernel" while true ; do diff --git a/smatch_scripts/wine_checker.sh b/smatch_scripts/wine_checker.sh index 24d2a3f2..5a6407e6 100755 --- a/smatch_scripts/wine_checker.sh +++ b/smatch_scripts/wine_checker.sh @@ -5,7 +5,16 @@ function useage { exit 1 } -CMD=smatch +SCRIPT_DIR=$(dirname $0) +if [ -e $SCRIPT_DIR/../smatch ] ; then + CMD=$SCRIPT_DIR/../smatch +elif which smatch | grep smatch > /dev/null ; then + CMD=smatch +else + echo "Smatch binary not found." + exit 1 +fi + POST="" WINE_ARGS="-p=wine --full-path -D__i386__" -- 2.11.4.GIT