Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I allowed to do anti-test-ism? (shell script) #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ EOF
exit 1
}

test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.
: ${srcdir:="$(dirname "$0")"}
: ${srcdir=.}

olddir=$(pwd)

Expand All @@ -36,23 +36,23 @@ cd $srcdir
# shellcheck disable=SC2016
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)

if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
case "$# $NOCONFIGURE" in ('0 ')
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
echo "*** If you wish to pass any to it, please specify them on the" >&2
echo "*** '$0' command line." >&2
echo "" >&2
fi
;;esac

aclocal --install || exit 1
autoreconf --verbose --force --install || exit 1

cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
case "$NOCONFIGURE" in ('')
$srcdir/configure "$@" || exit 1

if [ "$1" = "--help" ]; then exit 0 else
case "$1" in ("--help") exit 0 ;;(*)
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
;;esac
;;(*)
echo "Skipping configure process."
fi
;;esac