rathena/tools/check-doc
glighta 94d2acd0ad -Fix EDP pre-re not adding bonus (for grimtooth and venomknife) bugreport:6259
-Fix Invisibility remove by ruwach / sight / impr_concentration bugreport:7285
-Fix Dispel not removing dance, (inversed area check)
-Fix Cmake compilation broken since r17189

-Upd check-doc, athena-start to ask arg if none given.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17200 54d463be-8e91-2dee-dedb-b68131a5f0ec
2013-03-15 21:10:06 +00:00

31 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# checking-doc script by trojal
# modified by lighta
case $1 in
'script')
#find which script commands are missing from doc/script_commands.txt
echo "Missing script documentation for function :"
awk '/BUILDIN_DEF\(.*\),/ {b=match($0,"BUILDIN_DEF(.*),");c=match($0,",");print substr($0,b+12,c-b-12);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
awk '/BUILDIN_DEF2\(.*\),/ {b=match($0,"BUILDIN_DEF2(.*),");c=match($0,",");d=match($0 ,"\",\"");print substr($0,c+2,d-c-2);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
;;
'atc')
#find which atcommands are missing from doc/atcommands.txt
echo "Missing atcommand documentation for function :"
awk '/ACMD_DEF\(.*\),/ {b=match($0,"ACMD_DEF(.*),");c=match($0,",");print substr($0,b+9,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
awk '/ACMD_DEF2\(.*\),/ {b=match($0,"ACMD_DEF2(.*),");c=match($0,",");print substr($0,b+10,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
;;
'both')
$0 script
$0 atc
;;
*)
echo "Usage: check-doc { script | atc | both }"
read -p "Enter a valid option: " readEnterKey
$0 $readEnterKey
;;
esac