#!/bin/bash

# Catch Postbuild Error
function error {
  
  echo "Postbuild Failed."
  exit 1;
}

set -e
trap error ERR

echo "==>   POSTBUILD:"

echo "BR_STAGING: ${BR_STAGING}"
echo "BR_PROJECT: ${BR_PROJECT}"

ROOT_DIR=${BR_STAGING}/buildroot/target

echo " => Setting-up the target rootfs to be used by qemu"
PATH="${PATH}:${BR_STAGING}/cross/usr/bin" "${BR_PROJECT}/map-all-xattr.sh" "${ROOT_DIR}"
