X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage1%2Fstage1-install;h=dd89a72877473ceaa35769958ea6261f711df7aa;hb=3605ab38ca7604b1fe43c3bce5e4963730a85d39;hp=6efcf2eb5accbeeb560702c070e813db0617b4a6;hpb=6d3d50c17b24ef41f917f5776696eca810198092;p=hvlinux.git diff --git a/stage1/stage1-install b/stage1/stage1-install index 6efcf2e..dd89a72 100755 --- a/stage1/stage1-install +++ b/stage1/stage1-install @@ -1,7 +1,20 @@ -#!/bin/sh +#!/bin/bash LFS_STAGE=stage1 +# Let shell functions inherit ERR trap. Same as `set -E'. +set -o errtrace + +# Setting ERR trap does implicit `set -o errexit'. +trap myerr ERR + +function myerr() +{ + echo + echo "*** An error occured during ${LFS_STAGE}" + exit 1 +} + # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions @@ -14,19 +27,14 @@ export LFS_TMP="${LFS}/tmp" init_log_file -rscr mult "Performing pre-install" cis-pre-install +rscr mult "Performing pre-install" pre-install # Logging-in as 'lfs' user, and executing the install-1 script. The # 'su -' command starts with a clean environment and enters the home # directory of the user. -su - lfs -c "cd ${PWD}; ./install-1" && - -rscr mult "Performing post-install" cis-post-install +su - lfs -c "cd ${PWD}; ./install-1" -if [ $? -ne 0 ]; then - echo "*** An error occured during ${LFS_STAGE}" - exit 1 -fi +rscr mult "Performing post-install" post-install echo "Total build time: $(get_total_build_time ${LFS_LOG_FILE})h"