From 42c125fad6ff6ddd1d59085632399d2032233e69 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 2 Sep 2002 11:50:52 +0000 Subject: Prevent this script from being run in the same directory where this script lives. It will make more people happy. ;-) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2128 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tools') diff --git a/tools/configure b/tools/configure index 97a7d04dc9..f8dd633738 100755 --- a/tools/configure +++ b/tools/configure @@ -13,6 +13,31 @@ debug=$2 extra_defines="-" +if test "$1" = "--help"; then + echo "Rockbox configure script." + echo "Invoke this in a directory to generate a Makefile to build Rockbox" + echo "Do *NOT* run this within the tools directory!" + exit +fi + +if test -r "configure"; then + # this is a check for a configure script in the current directory, it there + # is one, try to figure out if it is this one! + + if { grep "^# Jukebox" configure >/dev/null 2>&1 } ; then + echo "WEEEEEEEEP. Don't run this configure script within the tools directory." + echo "It will only cause you pain and grief. Instead do this:" + echo "" + echo " cd .." + echo " mkdir build-dir" + echo " cd build-dir" + echo " ../tools/configure" + echo "" + echo "Much happiness will arise from this. Enjoy" + exit + fi +fi + input() { read response echo $response -- cgit v1.2.3