util-linux/po/update-potfiles

20 lines
448 B
Bash
Executable File

#!/bin/sh
#
# Copyright (C) 2009 Karel Zak <kzak@redhat.com>
#
# find all *.c files,
# sort the list
# exclude /samples/ subdirectories
# exclude ./tests/ from the list
# and remove "./" prefix
[ ! -f "po/Makevars" ] && \
echo "You must run this script in the top-level directory"
find -name "*.c" -or -name "*.h" | \
sort | \
sed ':/samples/:d' | \
gawk '! /^\.\/tests\// { print gensub(/^\.\//, "", 1) }' \
> po/POTFILES.in