viewing paste Unknown #1642 | Bash

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/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 scipt 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 {}'
        ;;
 
    '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 {}'
        ;;
 
        *)
                echo "Usage: check-doc { script | atc }"
        ;;
esac
Viewed 436 times, submitted by lighta.