plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

checkparse (466B)


      1 #!/bin/bash
      2 
      3 aflag=false
      4 if [ "$1" = -a ]; then
      5 	aflag=true
      6 	shift
      7 fi
      8 
      9 files="$@"
     10 if [ $# = 0 ]; then
     11 	files=$(echo ./test.rc;
     12 		grep -l '^#!/usr/local/plan9/bin/rc' /usr/local/plan9/bin/{*,*/*} 2>/dev/null;
     13 		grep -R -l '^#!/bin/rc' $HOME/pub/plan9 | egrep -v 'plan9/(lib/(oui|pci)|sys/man|sys/lib/man|sys/lib/scsicodes)' 2>/dev/null)
     14 fi
     15 
     16 for i in $files
     17 do
     18 	if ! diff <(./o.rc -DY $i 2>&1) <(./o.rc -D $i 2>&1); then
     19 		echo '^^^' $i
     20 		! $aflag && exit 1
     21 	fi
     22 done
     23