Skip to content

Commit

Permalink
verify_action should store result in variable
Browse files Browse the repository at this point in the history
  • Loading branch information
StormTrooper committed Oct 29, 2017
1 parent fedbdbd commit 5d8b384
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/common.sh
Expand Up @@ -15,7 +15,8 @@ function check_platform()

function verify_action()
{
if [ $? != 0 ]; then echo -e "Exiting build" && exit 1; fi
code=$?
if [ $code != 0 ]; then echo -e "Exiting build with return code ${code}" && exit 1; fi
}

function enable_nw_chroot()
Expand All @@ -33,9 +34,17 @@ function add_apt_key()
echo -e "Adding apt key"
wget ${2} -O ${1}/tmp/key
chroot ${1} apt-key add /tmp/key
verify_action
rm ${1}/tmp/key > /dev/null 2>&1
}

function add_apt_key_gpg()
{
echo -e "Adding apt key to trusted.gpg.d"
wget ${2} -O ${1}/etc/apt/trusted.gpg.d/${3}
verify_action
}

function emulate_arm()
{
echo Copying ARM QEMU binary
Expand Down

0 comments on commit 5d8b384

Please sign in to comment.