Fix FIXME: Emblems should be attached to icons via
[geeqie.git] / po / regen_potfiles.sh
index d0e4b89..dcddf44 100755 (executable)
@@ -1,3 +1,16 @@
 #!/bin/sh
 
-(cd .. ; grep -l 'N\?_[[:space:]]*(.*)' ./src/*.c) > POTFILES.in
+## @file
+## @brief Generate a patch to update POTFILES
+##
+## Use like this: ./regen_potfiles.sh | patch -p0
+##
+
+# TODO(xsdg): Re-write this in a simpler way and test that it works: (cd ..; find ... | sort > $TMP)
+
+TMP=POTFILES.$$
+( (find ../src/ -type f \( -name '*.c' -o -name '*.cc' -o -name "*.ui" \) ; find ../ -type f -name '*.desktop.in' ; find ../ -type f -name '*.appdata.xml.in') | while read -r f; do
+       (echo "$f" | sed 's#^../##')
+done) | sort > "$TMP"
+diff -u POTFILES "$TMP"
+rm -f "$TMP"