Files
Arquivotheca.Solaris-2.5/lib/libcmd/makelibcmdcatalog.sh
seta75D 7c4988eac0 Init
2021-10-11 19:38:01 -03:00

44 lines
583 B
Bash
Executable File

#!/bin/sh
#
#ident "@(#)makelibcmdcatalog.sh 1.1 92/09/05 SMI"
#
# Copyright (c) 1989 by Sun Microsystems, Inc.
#
XGETTEXT=xgettext
MSGDIR=$1
#
# Change Directory
#
rm -f *.po
#
# get list of files
#
FILES=`grep dgettext *.c | sed "s/:.*//" | sort | sed "s/\.c//" | uniq`
#
# Create po files
# No need for options for xgettext
#
for i in ${FILES}
do
cat ${i}.c | sed "s/_dgettext/gettext/" > ${i}.i
${XGETTEXT} ${i}.i
cat messages.po | sed "/^domain/d" > ${i}.po
rm -f ${i}.i messages.po
done
#
# Copy .po files
#
cp *.po ${MSGDIR}
#
# And remove them
#
rm -f *.po