Path: blob/main/crypto/krb5/src/util/et/compile_et.sh
34907 views
#!/bin/sh1#2#3AWK=@AWK@4DIR=@DIR@56usage="usage: $0 [ -d scriptDir ] [ --textdomain domain [ --localedir dir ] ]"7usage="$usage inputfile.et"89TEXTDOMAIN=10LOCALEDIR=1112while [ $# -ge 2 ]; do13if [ "$1" = "-d" ]; then14DIR=$2; shift; shift15elif [ "$1" = "--textdomain" ]; then16TEXTDOMAIN=$2; shift; shift17elif [ "$1" = "--localedir" ]; then18LOCALEDIR=$2; shift; shift19else20echo $usage 1>&2 ; exit 121fi22done2324# --localedir requires --textdomain.25if [ $# -ne 1 -o \( -n "$LOCALEDIR" -a -z "$TEXTDOMAIN" \) ]; then26echo $usage 1>&2 ; exit 127fi2829ROOT=`echo $1 | sed -e s/.et$//`30BASE=`echo "$ROOT" | sed -e 's;.*/;;'`3132set -ex33$AWK -f ${DIR}/et_h.awk "outfile=${BASE}.h" "$ROOT.et"34$AWK -f ${DIR}/et_c.awk "outfile=${BASE}.c" "textdomain=$TEXTDOMAIN" \35"localedir=$LOCALEDIR" "$ROOT.et"363738