From 59d1e3317be6b62361d7e9394dd1f981621273cd Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Tue, 25 Sep 2012 14:40:42 -0500 Subject: [PATCH] autogen.sh: Clean up syntax Standardize all variable names to be upper case. Move 'cd' command to improve readability. --- autogen.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 9c7835212..b16d41082 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,12 +13,14 @@ LIBTOOLIZE=libtoolize AUTOCONF=autoconf AUTOMAKE=automake -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. +# variables below this line should not need modification +SRCDIR=`dirname $0` +test -z "$SRCDIR" && SRCDIR=. ORIGDIR=`pwd` -cd $srcdir + PROJECT=hamlib + TEST_TYPE=-f FILE=include/hamlib/rig.h @@ -49,6 +51,8 @@ if test "$DIE" -eq 1; then exit 1 fi +cd $SRCDIR + test $TEST_TYPE $FILE || { echo "You must run this script in the top-level $PROJECT directory" exit 1 @@ -73,4 +77,4 @@ if test -z "$*"; then echo "to pass any to it, please specify them on the $0 command line." fi -$srcdir/configure --enable-maintainer-mode "$@" +$SRCDIR/configure --enable-maintainer-mode "$@"