source: trunk/diffutils/exgettext@ 2693

Last change on this file since 2693 was 2556, checked in by bird, 20 years ago

diffutils 2.8.1

File size: 3.2 KB
Line 
1#! /bin/sh
2# Wrapper around gettext for programs using the msgid convention.
3
4# Copyright (C) 1998, 2001 Free Software Foundation, Inc.
5
6# Written by Paul Eggert <[email protected]>.
7
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2, or (at your option)
11# any later version.
12
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
19# along with GNU CC; see the file COPYING. If not, write to
20# the Free Software Foundation, 59 Temple Place - Suite 330,
21# Boston, MA 02111-1307, USA.
22
23# Always operate in the C locale.
24LANG=C
25LANGUAGE=C
26LC_ALL=C
27export LANG LANGUAGE LC_ALL
28
29# Set AWK if environment has not already set it.
30AWK=${AWK-awk}
31
32# The argument to this wrapper is the xgettext command to be executed.
33# Extract the xgettext program name from the rest of the command.
34xgettext=${1?}
35shift
36
37# Save work if we're just wrapping a no-op.
38case $xgettext in
39:) exit;;
40esac
41
42# Find the files to be scanned, and the directory to scan them from.
43directory=.
44files=
45for i
46do
47 case $i in
48 --directory=*)
49 directory=`expr " $i" : ' --directory=\(.*\)'`;;
50 --files-from=*)
51 files_from=`expr " $i" : ' --files-from=\(.*\)'`
52 files=`$AWK '/^[^#]/ { print }' $files_from`;;
53 esac
54done
55