123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/sh
- #
- #
- AWK=gawk
- DIR=/croot/krb5_1686930994487/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/share/et
- usage="usage: $0 [ -d scriptDir ] [ --textdomain domain [ --localedir dir ] ]"
- usage="$usage inputfile.et"
- TEXTDOMAIN=
- LOCALEDIR=
- while [ $# -ge 2 ]; do
- if [ "$1" = "-d" ]; then
- DIR=$2; shift; shift
- elif [ "$1" = "--textdomain" ]; then
- TEXTDOMAIN=$2; shift; shift
- elif [ "$1" = "--localedir" ]; then
- LOCALEDIR=$2; shift; shift
- else
- echo $usage 1>&2 ; exit 1
- fi
- done
- # --localedir requires --textdomain.
- if [ $# -ne 1 -o \( -n "$LOCALEDIR" -a -z "$TEXTDOMAIN" \) ]; then
- echo $usage 1>&2 ; exit 1
- fi
- ROOT=`echo $1 | sed -e s/.et$//`
- BASE=`echo "$ROOT" | sed -e 's;.*/;;'`
- set -ex
- $AWK -f ${DIR}/et_h.awk "outfile=${BASE}.h" "$ROOT.et"
- $AWK -f ${DIR}/et_c.awk "outfile=${BASE}.c" "textdomain=$TEXTDOMAIN" \
- "localedir=$LOCALEDIR" "$ROOT.et"
|