2013-11-07 01:08:19 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# KEYWORDS
|
2013-11-16 04:05:09 +00:00
|
|
|
KEYWORDS=$(ack '#define (\w+.|\w+)' header.inc --output='$1')'\n'
|
|
|
|
KEYWORDS+=$(ack '^FUNCTION \w+ (\w+.|\w+)' runtime.inc --output='$1')'\n'
|
2013-11-16 17:33:01 +00:00
|
|
|
KEYWORDS+=$(ack '^FUNCTION \w+<\w+> (\w+.|\w+)' runtime.inc --output='$1')'\n'
|
2013-11-16 04:05:09 +00:00
|
|
|
KEYWORDS+=$(ack '^SUB (\w+)' runtime.inc --output='$1')
|
2013-11-07 01:08:19 +00:00
|
|
|
|
|
|
|
# FUNCTION/SUB PROTOTYPES
|
2013-11-16 04:05:09 +00:00
|
|
|
PROTO=$(ack '^FUNCTION \w+ (.+\))' runtime.inc --output='$1')'\n'
|
2013-11-16 17:33:01 +00:00
|
|
|
PROTO+=$(ack '^FUNCTION \w+<\w+> (.+\))' runtime.inc --output='$1')'\n'
|
2013-11-16 04:05:09 +00:00
|
|
|
PROTO+=$(ack '^SUB (.+\))' runtime.inc --output='$1')
|
2013-11-07 01:08:19 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# SAVE SORTED KEYWORDS/PROTOTYPES
|
|
|
|
echo "$KEYWORDS" | sort > Keywords.txt
|
|
|
|
echo "$PROTO" | sort > Prototypes.txt
|
|
|
|
echo "Done."
|
|
|
|
|