build - Separate out CFLAGS for kernel & module build
[dragonfly.git] / contrib / ee / genstr
blob429f9602f6157557d71adb80efeeecbadf4918f6
1 #!/bin/sh
3 set -x
5 if [ $# -lt 2 ]
6 then
7 echo usage $0 source_file dest_file
8 exit 1
9 fi
11 trap 'rm -f /tmp/$$.out; exit 0' 0 # set up traps to clean up
12 trap 'rm -f /tmp/$$.out; exit 1' 1 2 3 15 # on errors AND normal exit
14 if [ -f $2 ]
15 then
16 rm $2
19 cat $1 | grep 'catgetlocal.*\"*\"' |
20 sed -e 's/^.*catgetlocal(//' |
21 sed -e 's/^[ ]*//' |
22 sed -e 's/, \"/ \"/' |
23 sed -e 's/);//' > /tmp/$$.out
25 cat > $2 <<EOF
26 \$
27 \$
28 \$set 1
29 \$quote "
30 EOF
32 sort -n < /tmp/$$.out >> $2