view scripts/config-headers.sh @ 14:86e83045be37

scripts/config-headers.sh: allow this script to be re-run
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 27 Sep 2016 04:23:46 +0000
parents c01d2500a998
children fd8227e3047d
line wrap: on
line source

#!/bin/sh

if [ $# != 1 ]
then
	echo "usage: $0 config-flavor" 1>&2
	exit 1
fi

if [ -z "$TARGET" ]
then
	echo "Error: TARGET= must be passed via environment" 1>&2
	exit 1
fi

if [ -z "$BUILD_DIR" ]
then
	echo "Error: BUILD_DIR= must be passed via environment" 1>&2
	exit 1
fi

set -e

rm -rf $BUILD_DIR/config
cp -r cfg-headers/$1 $BUILD_DIR/config
cp targets/$TARGET.h $BUILD_DIR/config/fc-target.cfg