#!/bin/sh
intltoolize --force --copy
aclocal
touch ChangeLog # keep automake happy
automake --copy --add-missing
autoconf

# If this is a git repository, and git-merge-changelog is available,
# use it.
if [ -d .git ] && git --version 2>/dev/null >/dev/null && \
  git-merge-changelog 2>/dev/null >/dev/null; then
  git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
  git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
fi

if [ -x /usr/bin/tx ]; then
  rm -rf .tx
  tx init --host=https://www.transifex.com
  tx set --execute --auto-local -r system-config-printer.default \
    'po/<lang>.po' --source-lang en \
    --source-file po/system-config-printer.pot
fi
