cross-toolchain: terminate init.sh when fetch fails (thanks R41z)
This commit is contained in:
		| @@ -32,6 +32,9 @@ usyscalls header $JEHANNE/sys/src/sysconf.json > $JEHANNE/arch/amd64/include/sys | |||||||
| # create a GCC crosscompiler in Debian without requiring root access or Tex. | # create a GCC crosscompiler in Debian without requiring root access or Tex. | ||||||
| # And this despite the extreme quality of Debian GNU/Linux! | # And this despite the extreme quality of Debian GNU/Linux! | ||||||
|  |  | ||||||
|  | # To create a Jehanne version of GCC, we need specific OUTDATED versions | ||||||
|  | # of Autotools that won't compile easily in a modern Linux distro. | ||||||
|  |  | ||||||
| echo -n please wait. | echo -n please wait. | ||||||
| ( | ( | ||||||
| 	# Inside parentheses, and therefore a subshell . . . | 	# Inside parentheses, and therefore a subshell . . . | ||||||
| @@ -44,12 +47,6 @@ echo -n please wait. | |||||||
| dotter=$! | dotter=$! | ||||||
| date > cross-toolchain.build.log | date > cross-toolchain.build.log | ||||||
|  |  | ||||||
| # fetch all sources |  | ||||||
| (cd src && fetch) >> cross-toolchain.build.log 2>&1 |  | ||||||
|  |  | ||||||
| # To create a Jehanne version of GCC, we need specific OUTDATED versions |  | ||||||
| # of Autotools that won't compile easily in a modern Linux distro. |  | ||||||
|  |  | ||||||
| function failOnError { | function failOnError { | ||||||
| 	# $1 -> exit status on a previous command | 	# $1 -> exit status on a previous command | ||||||
| 	# $2 -> task description | 	# $2 -> task description | ||||||
| @@ -66,6 +63,10 @@ function failOnError { | |||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
|  |  | ||||||
|  | # fetch all sources | ||||||
|  | (cd src && fetch) >> cross-toolchain.build.log 2>&1 | ||||||
|  | failOnError $? "fetching sources" | ||||||
|  |  | ||||||
| # build m4 1.4.14 | # build m4 1.4.14 | ||||||
| # - workaround a bug in lib/stdio.in.h, see http://lists.gnu.org/archive/html/bug-m4/2012-08/msg00008.html | # - workaround a bug in lib/stdio.in.h, see http://lists.gnu.org/archive/html/bug-m4/2012-08/msg00008.html | ||||||
| # - workaround a bug in src/m4.h, see https://bugs.archlinux.org/task/19829 | # - workaround a bug in src/m4.h, see https://bugs.archlinux.org/task/19829 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user