#!/bin/sh
set -e

TARGET=/etc/xpdf/includes

# Generate /etc/xpdf/includes from /etc/xpdf/*
# This allows the xpdf-* language add-on packages
# to supply configuration file snippets.

echo \# DO NOT EDIT THIS FILE DIRECTLY. >> $TARGET
echo \# This file was automatically generated by /usr/sbin/update-xpdfrc. > $TARGET
echo \# Instead, add or remove files in /etc/xpdf/ then run >> $TARGET
echo \# /usr/sbin/update-xpdfrc to regenerate this file. >> $TARGET
echo >> $TARGET

find /etc/xpdf \
  -name xpdfrc-\* \
  -and -not -name \*.dpkg\* \
  -and -not -name \*~ \
  -and -not -name \*,v \
  -printf "include %p\n" >> $TARGET

