]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - po/update-potfiles
scriptreplay: check for EOF
[thirdparty/util-linux.git] / po / update-potfiles
index 925f386c4a74e4db1e85a728e234b44d9f9a4188..1cbfdc4705294134c425d95d84c0bb40e560647c 100755 (executable)
@@ -15,11 +15,13 @@ fi
 # find all git-tracked files
 source_files=$(git ls-files . 2>/dev/null)
 if [ $? -ne 0 ] || [ -z "$source_files" ]; then
-       echo "$0: warning: update-potfiles requires git" >&2
        # we still go through the rest of this script to provide at least an empty
        # list or remove non-existing (deleted) files
        source_files=$(cat po/POTFILES.in 2>/dev/null)
 fi
+if [ $? -ne 0 ] || [ -z "$source_files" ]; then
+       source_files=$(find . -type f -printf "%P\\n" 2>/dev/null)
+fi
 
 # apply include/exclude patterns
 source_files=$(
@@ -28,6 +30,7 @@ source_files=$(
                -e '/\(\.h\|\.c\)$/!d' \
                -e '/^tests\//d' \
                -e '/\/samples\//d' \
+               -e '/^Documentation\//d' \
 )
 
 # throw away non-existing files (dirty git repo)