cross-toolchain: terminate init.sh when fetch fails (thanks R41z)

This commit is contained in:
Giacomo Tesio 2017-08-30 23:11:16 +02:00
parent 83eeb61e84
commit 7b8ebef97c

View File

@ -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.
# 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.
(
# Inside parentheses, and therefore a subshell . . .
@ -44,12 +47,6 @@ echo -n please wait.
dotter=$!
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 {
# $1 -> exit status on a previous command
# $2 -> task description
@ -66,6 +63,10 @@ function failOnError {
fi
}
# fetch all sources
(cd src && fetch) >> cross-toolchain.build.log 2>&1
failOnError $? "fetching sources"
# 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 src/m4.h, see https://bugs.archlinux.org/task/19829