#!/usr/bin/env bash ## const dir_conf="conf" dir_build="build" ## args if [ $# -ge 1 ] ; then profile=$1 && shift ; else profile="-" ; fi ## exec ### compiling echo ">> building …" 1>&2 make --file=tools/makefile ### placing conf if [ ${profile} = "" ] then echo ">> no profile specified; won't place conf" 1>&2 else echo ">> placing conf for profile '${profile}' …" 1>&2 cp ${dir_conf}/${profile}.json ${dir_build}/conf.json fi