#!/bin/sh

set -e

if [ -z "$1" ]
then
	echo "Logo to generate overlay from was not specified."
	exit 1
fi

DIR="$(dirname "$(which "$0")")"

export LOGO_URL="file://$DIR/logoGen/$1.svg"
envsubst < "$DIR/overlay.svg" > overlay.tmp.svg

inkscape -o overlay.png overlay.tmp.svg
rm overlay.tmp.svg
