xref: /freebsd/contrib/tcsh/nls/catgen (revision d13def78ccef6dbc25c2e197089ee5fc4d7b82c3)
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