1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
freebsd/contrib/ee/genstr
Ed Schouten 72fcea8cb7 Copy ee 1.4.2 into the contrib directory.
This allows me to merge our custom changes to ee(1) back on top of
original sources, with correct mergeinfo.
2009-05-26 20:13:17 +00:00

33 lines
489 B
Bash
Executable File

#!/bin/sh
set -x
if [ $# -lt 2 ]
then
echo usage $0 source_file dest_file
exit 1
fi
trap 'rm -f /tmp/$$.out; exit 0' 0 # set up traps to clean up
trap 'rm -f /tmp/$$.out; exit 1' 1 2 3 15 # on errors AND normal exit
if [ -f $2 ]
then
rm $2
fi
cat $1 | grep 'catgetlocal.*\"*\"' |
sed -e 's/^.*catgetlocal(//' |
sed -e 's/^[ ]*//' |
sed -e 's/, \"/ \"/' |
sed -e 's/);//' > /tmp/$$.out
cat > $2 <<EOF
\$
\$
\$set 1
\$quote "
EOF
sort -n < /tmp/$$.out >> $2