#!/usr/bin/env bash
set -e
set -x
if [ -f  '/usr/src/hardened_malloc/Makefile' ]; then
   cd /usr/src/hardened_malloc/
   make -s VARIANT=default CONFIG_NATIVE=false
fi
if [ -f  '/usr/src/hardened_malloc/out/libhardened_malloc.so' ]; then
   echo '/usr/src/hardened_malloc/out/libhardened_malloc.so' | tee /etc/ld.so.preload
fi

