summaryrefslogtreecommitdiff
path: root/tools/maint/init_potfiles.sh
blob: e92c120e7314daed099f09983c260c0bd2603d2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

function keep_i18n() {

    while read file;
    do

        if [ "$file" != "i18n.h" ]; then

            grep -q '_(' $file

            status=$?

            if [ "$status" -eq 0 ]; then
                echo $file
            fi

        fi

    done

}

mkdir -p po

find . -type f -name '*.[ch]' | keep_i18n | sort >  po/POTFILES.in