#! /bin/bash
# Last edited on 2016-12-28 23:40:17 by stolfilocal

snap="2016-12-16-aa-snapshot"

function cmpdir(){
  dira="$1"; shift;
  dirb="$1"; shift;
  
  prdiff \
      -r -Bb \
      -x '*~' \
      -x '*.o' \
      -x '*.ho' \
      -x '*.a' \
      -x '*.make' \
      -x '*.eps' \
      -x '*.ps' \
      -x 'Makefile' \
      -x '00-README' \
      -x 'JSLIBS' \
      -x 'extract-ho-deps' \
      -x 'tests/flttests/flttests' \
      -x 'tests/flttimes/flttimes' \
      -x 'tests/ieeetests/ieeetests' \
      -x 'tests/testfptest/testfptest' \
      -x 'tests/iatimes/iatimes' \
      -x 'tests/iavalid/iavalid' \
      -x 'tests/aatests/aatests' \
      -x 'tests/aatimes/aatimes' \
      -x 'tests/aavalid/aavalid' \
      -x 'tests/fn1_zeros/fn1_zeros' \
      -x 'tests/fn2_zeros/fn2_zeros' \
      -x 'tests/zftest/zftest' \
      -x 'tests/fn1_graphs/fn1_graphs' \
      ${dira} ${dirb} \
    | egrep -v -e 'Only in JSLIBS/lib(js|geo|ps)'
}

cmpdir ${snap}/libjs JSLIBS/libjs 
cmpdir ${snap}/libgeo JSLIBS/libgeo 
cmpdir ${snap}/libps JSLIBS/libps 
cmpdir ${snap}/libflt JSLIBS/libflt 
cmpdir ${snap}/libia JSLIBS/libia 
cmpdir ${snap}/libaa JSLIBS/libaa 
cmpdir ${snap}/libaafuncs JSLIBS/libaafuncs
cmpdir ${snap}/libaazf JSLIBS/libaazf 
cmpdir ${snap}/libaagraph JSLIBS/libaagraph  
cmpdir ${snap}/aa-lhf-zeros MISC/aa-lhf-zeros 
