build_oran.sh: use bash as interpreter and set pipefail
authorJackie Huang <jackie.huang@windriver.com>
Wed, 16 Oct 2019 06:53:59 +0000 (14:53 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Wed, 16 Oct 2019 06:53:59 +0000 (14:53 +0800)
Use bash as interpreter and set pipefail so that the non-zero
exit status of bitbake command can be captured.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Icf186eb61bf1eef4a12d8a14146b2216722e910e

scripts/build_oran.sh

index fd8df20..ea2231f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 help_info () {
 cat << ENDHELP
@@ -107,4 +107,5 @@ EOF
 # Build the oran-inf-host image
 mkdir -p logs
 TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
+set -o pipefail
 bitbake ${DRYRUN} oran-image-inf-host 2>&1|tee logs/bitbake_oran-image-inf-host_${TIMESTAMP}.log