Files
docker-deployment/bin/make
2016-05-14 20:23:22 +01:00

17 lines
327 B
Plaintext

FILE=$DOCKER_HOME/images/$1.mk
if [ ! -e $FILE ]; then
DELETE=true
FILE="$(mktemp)"
cat <<- EOF > $FILE
include \$(DOCKER_HOME)/build/Makefile
NAME = $1
VERSION = latest
build: prepare $1
EOF
fi
make -f $FILE build
CODE=$?
if [ ! -z ${DELETE+x} ]; then
rm $FILE
fi
exit $CODE