1*f59d82ffSelric#!/bin/sh 2*f59d82ffSelric 3*f59d82ffSelrictop_srcdir=@top_srcdir@ 4*f59d82ffSelricname="@PACKAGE_NAME@" 5*f59d82ffSelricversion="@PACKAGE_VERSION@" 6*f59d82ffSelric 7*f59d82ffSelricdomain=$1 8*f59d82ffSelricshift 9*f59d82ffSelric 10*f59d82ffSelricoutdir=${top_srcdir}/po/${domain} 11*f59d82ffSelricoutfile=${outdir}/${domain}.pot 12*f59d82ffSelric 13*f59d82ffSelrictest -d $outdir || mkdir $outdir 14*f59d82ffSelric 15*f59d82ffSelricxgettext \ 16*f59d82ffSelric --package-name="${name}" \ 17*f59d82ffSelric --package-version="${version}" \ 18*f59d82ffSelric --foreign-user \ 19*f59d82ffSelric --default-domain=${domain} \ 20*f59d82ffSelric --add-comments \ 21*f59d82ffSelric --keyword=N_ \ 22*f59d82ffSelric --keyword=NP_ \ 23*f59d82ffSelric -o ${outfile}.new \ 24*f59d82ffSelric "$@" 25*f59d82ffSelric 26*f59d82ffSelrictest -f ${outfile}.new && \ 27*f59d82ffSelric perl -pi -e "s@${top_srcdir}/@@" ${outfile}.new 28*f59d82ffSelric 29*f59d82ffSelricgrep -v "POT-Creation-Date:" ${outfile}.new > ${outfile}.new2 30*f59d82ffSelricgrep -v "POT-Creation-Date:" ${outfile} > ${outfile}.old 31*f59d82ffSelric 32*f59d82ffSelricif ! diff ${outfile}.old ${outfile}.new2 >/dev/null; then 33*f59d82ffSelric echo "${outfile} changed" 34*f59d82ffSelric cp ${outfile}.new ${outfile} 35*f59d82ffSelricfi 36*f59d82ffSelricrm ${outfile}.new* ${outfile}.old 37*f59d82ffSelric 38*f59d82ffSelricexit 0 39*f59d82ffSelric 40