From: Florian Krohm Date: Sat, 13 Aug 2011 15:35:21 +0000 (+0000) Subject: Complain if invoked from the wrong directory or if mandatory X-Git-Tag: svn/VALGRIND_3_7_0~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b125cb6ef8b48dd64dfa869518be3fdf8e257c65;p=thirdparty%2Fvalgrind.git Complain if invoked from the wrong directory or if mandatory argument is missing. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11974 --- diff --git a/gdbserver_tests/make_local_links b/gdbserver_tests/make_local_links index 30d7231200..44f36c5041 100755 --- a/gdbserver_tests/make_local_links +++ b/gdbserver_tests/make_local_links @@ -10,6 +10,20 @@ # The vgdb link is needed either for gdb tests # or for standalone vgdb tests. +# Make sure we're in the correct directory, i.e. the root of the valgrind +# source tree. We use the existence of the coregrind directory as evidence +# that we're in the right place. +if [ ! -d "coregrind" ]; then + echo "make_local_links is not invoked from the top-of-tree directory" 1>&2 + exit 1 +fi + +# Make sure there is an argument +if [ "x$1" = "x" ]; then + echo "usage: make_local_links /path/to/gdb" 1>&2 + exit 1 +fi + if [ -x "$1" ] then ln -f -s "$1" gdbserver_tests/gdb