mkdir -p $(DESTDIR)${runstatedir}/${PACKAGE_NAME}
add-changelog-entry:
- ./changelog_unreleased/.add-entry.sh
+ @./changelog_unreleased/.add-entry.sh
#### include external sources in the distributed tarball:
EXTRA_DIST = ext/coroutine/coroutine.hpp
parent_dir=$(cd "$(dirname "${0}")" && pwd)
cd "${parent_dir}" || exit 1
+basedir=$(basename "${parent_dir}")
author=$(git show -s --format='%ae' | cut -d '@' -f 1)
branch=$(git branch --show-current)
-file="${branch}"
gitlab_id=$(printf '%s' "${branch}" | cut -d '-' -f 1)
-printf '[category]\t\t%s\n' "${author}" > "${file}"
-printf '\tdescription\n' >> "${file}"
-printf '\t(Gitlab #%s)\n' "${gitlab_id}" >> "${file}"
-printf 'Created changelog_unreleased/%s.\n' "${file}"
+file="${branch}"
+if test -e "${file}"; then
+ printf 'Nothing done. File already exists: %s\n' "${basedir}/${file}"
+ exit 1
+fi
+content=$(cat .template)
+content="${content//author/${author}}"
+content="${content//#0000/#${gitlab_id}}"
+printf '%s\n' "${content}" > "${file}"