xref: /freebsd/contrib/tcsh/nls/catgen (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1#!/bin/sh
2# Wrapper for gencat
3TMP=/tmp/catgen.$$
4trap "rm -f $TMP" 0 1 2 3 15
5
6sortit() {
7	awk '/^\$set/ {print $2, FILENAME}' "$@" | sort -n | cut -d ' ' -f 2
8}
9
10GENCAT="$1"
11shift
12OUT="$1"
13shift
14CHARSET="$1"
15shift
16cat "${CHARSET}" `sortit "$@"` > "$TMP"
17
18echo "`basename "$OUT" .cat`"
19"${GENCAT}" "$OUT" "$TMP"
20exit 0
21