diff options
author | Robert Moore <Robert.Moore@intel.com> | 2012-07-13 14:29:48 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2012-07-13 14:29:48 -0700 |
commit | b9058029d3bd6216f594a3b5e70b2f6cba1052ad (patch) | |
tree | 692bae06674bad6d4012d2278eb209477bcf8cc7 /generate/linux | |
parent | 04520d5f9f3d13de06dfee48611ed583cd723f1e (diff) | |
download | acpica-b9058029d3bd6216f594a3b5e70b2f6cba1052ad.tar.gz |
Linux/ACPICA divergence script: Add error checking.
Add some checks for input, etc.
Diffstat (limited to 'generate/linux')
-rwxr-xr-x | generate/linux/divergence.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/generate/linux/divergence.sh b/generate/linux/divergence.sh index 444c3e4c2..377836c3f 100755 --- a/generate/linux/divergence.sh +++ b/generate/linux/divergence.sh @@ -9,22 +9,34 @@ # # Usage: ./divergence.sh <Path to root of linux source code> # - if [ -z $1 ] ; then echo "Usage: $0 <Linux>" echo " Linux: Path of Linux source" exit 1 fi - -# Get the root of the ACPICA source tree -ACPICA=`readlink -f ../..` +if [ ! -e $1 ] ; then + echo "$1, Linux source directory does not exist" + exit 1 +fi +if [ ! -d $1 ] ; then + echo "$1, Not a directory" + exit 1 +fi LINUX=$1 -LINDENT=$ACPICA/generate/linux/patches/lindent.sh ACPICA_TMP=acpica_tmp LINUX_ACPICA=linux-acpica ACPICA_LINUXIZED=acpica-linuxized +# Get the root of the ACPICA source tree +ACPICA=`readlink -f ../..` + +LINDENT=$ACPICA/generate/linux/patches/lindent.sh +if [ ! -e $LINDENT ] ; then + echo "Could not find lindent.sh script" + exit 1 +fi + # # Build the AcpiSrc utility if necessary # |