540bd4177df446a5d2542da79f86dd4e3551eb6c
[geeqie.git] / po / regen_potfiles.sh
1 #!/bin/sh
2
3 ## @file
4 ## @brief Generate a patch to update POTFILES
5 ##
6 ## Use like this: ./regen_potfiles.sh | patch -p0
7 ##
8
9 # TODO(xsdg): Re-write this in a simpler way and test that it works: (cd ..; find ... | sort > $TMP)
10
11 TMP=POTFILES.$$
12 ((find ../src/ -type f \( -name '*.c' -o -name '*.cc' \) ; find ../ -type f -name '*.desktop.in' ; find ../ -type f -name '*.appdata.xml.in') | while read f; do
13         (echo $f | sed 's#^../##')
14 done) | sort > $TMP
15 diff -u POTFILES $TMP
16 rm -f $TMP