#!/bin/bash
#
# Create the Tvheadend changelog
#

# Arguments
CHANGELOG=$1
DIST=$2
VER=$3

# Defaults
[ -z "$DEBEMAIL"      ] && DEBEMAIL="andreas@lonelycoder.com"
[ -z "$DEBFULLNAME"   ] && DEBFULLNAME="Andreas Öman"
[ -z "$VER"           ] && VER=$($(dirname $0)/version)
[ ! -z "$DIST"        ] && VER=${VER}~${DIST}
[ -z "$DIST"          ] && DIST=unstable

# Output
NOW=$(date -R)
echo >${CHANGELOG} "tvheadend (${VER}) ${DIST}; urgency=low"
echo >>${CHANGELOG}
echo >>${CHANGELOG} "  * The full changelog can be found at "
echo >>${CHANGELOG} "    http://www.lonelycoder.com/tvheadend/download"
echo >>${CHANGELOG}
echo >>${CHANGELOG} " -- ${DEBFULLNAME} <${DEBEMAIL}>  ${NOW}"
