This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
NeoStats-NeoIRCd/messages/build_one
2002-08-13 14:34:25 +00:00

26 lines
583 B
Bash
Executable file

#!/bin/sh
# This is a script to build a single message file based on the variables
# in Makefile (yes, this means that configure MUST have been run
# prior to using this)
if [ ! $1 ]; then
echo Please specify a message source
exit 1
fi
if [ ! -f $1 ]; then
echo Please specify a valid message source
exit 2
fi
if [ ! -f Makefile]; then
echo Please run configure first
exit 3
fi
MSGFMT=`grep '^MSGFMT' Makefile | sed 's/MSGFMT//' | sed 's/ = //' | tr -d '\r' | tr -d '\n'`
BASENAME=`basename $1 | sed 's/\.po//'`
echo $MSGFMT $BASENAME.mo $1
$MSGFMT $BADENAME.mo $1