You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
jade/generate-keywords.sh

19 lines
650 B

#!/bin/sh
# KEYWORDS
KEYWORDS=$(ack '#define (\w+.|\w+)' header.inc --output='$1')'\n'
KEYWORDS+=$(ack '^FUNCTION \w+ (\w+.|\w+)' runtime.inc --output='$1')'\n'
KEYWORDS+=$(ack '^FUNCTION \w+<\w+> (\w+.|\w+)' runtime.inc --output='$1')'\n'
KEYWORDS+=$(ack '^SUB (\w+)' runtime.inc --output='$1')
# FUNCTION/SUB PROTOTYPES
PROTO=$(ack '^FUNCTION \w+ (.+\))' runtime.inc --output='$1')'\n'
PROTO+=$(ack '^FUNCTION \w+<\w+> (.+\))' runtime.inc --output='$1')'\n'
PROTO+=$(ack '^SUB (.+\))' runtime.inc --output='$1')
#
# SAVE SORTED KEYWORDS/PROTOTYPES
echo "$KEYWORDS" | sort > Keywords.txt
echo "$PROTO" | sort > Prototypes.txt
echo "Done."