[build-and-install.sh] add option to stop on error