freebsd_amp_hwpstate/contrib/tcsh/nls/catgen

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
320 B
Plaintext
Raw Normal View History

2012-02-20 00:53:59 +00:00
#!/bin/sh
# Wrapper for gencat
TMP=/tmp/catgen.$$
trap "rm -f $TMP" 0 1 2 3 15
2017-03-18 21:41:53 +00:00
sortit() {
awk '/^\$set/ {print $2, FILENAME}' "$@" | sort -n | cut -d ' ' -f 2
}
2012-02-20 00:53:59 +00:00
GENCAT="$1"
shift
OUT="$1"
shift
2017-03-18 21:41:53 +00:00
CHARSET="$1"
shift
2019-10-08 18:20:02 +00:00
cat "${CHARSET}" `sortit "$@"` > "$TMP"
2017-03-18 21:41:53 +00:00
2019-10-08 18:20:02 +00:00
echo "`basename "$OUT" .cat`"
2012-02-20 00:53:59 +00:00
"${GENCAT}" "$OUT" "$TMP"
2017-03-18 21:41:53 +00:00
exit 0