diff mbox

Make sure that contrib/download_prerequisites is run from correct place

Message ID 20150910073334.GF432@x4
State New
Headers show

Commit Message

Markus Trippelsdorf Sept. 10, 2015, 7:33 a.m. UTC
A user complained on the gcc-help list that download_prerequisites
wasn't working for him, because he ran it from the wrong directory.

Tested on x86_64-pc-linux-gnu.
OK for trunk and active branches?

	* download_prerequisites: Make sure that script is run from
	top level source directory.

Comments

Jeff Law Sept. 10, 2015, 6:32 p.m. UTC | #1
On 09/10/2015 01:33 AM, Markus Trippelsdorf wrote:
> A user complained on the gcc-help list that download_prerequisites
> wasn't working for him, because he ran it from the wrong directory.
>
> Tested on x86_64-pc-linux-gnu.
> OK for trunk and active branches?
>
> 	* download_prerequisites: Make sure that script is run from
> 	top level source directory.
OK.
jeff
diff mbox

Patch

diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites
index de0e7c41847d..95fab9aecfe1 100755
--- a/contrib/download_prerequisites
+++ b/contrib/download_prerequisites
@@ -24,6 +24,11 @@ 
 # be downloaded.
 GRAPHITE_LOOP_OPT=yes
 
+if [ ! -e gcc/BASE-VER ] ; then
+	echo "You must run this script in the top level GCC source directory."
+	exit 1
+fi
+
 # Necessary to build GCC.
 MPFR=mpfr-2.4.2
 GMP=gmp-4.3.2