cmplib 801 Bytes
#!/bin/sh
#
# script to compare library in asm level 
#
#  cmplib [file1] [file2]
#

if test $# -gt 1 
 then
	FILE1=$1;FILE2=$2
 else
	echo "cmplib [file1] [file2]" ; exit 1
 fi

if test ! -r $FILE1 ;then
  echo $FILE1 is maybe non-exist ;  exit 0 ; fi

if test ! -r $FILE2 ;then
  echo $FILE2 is maybe non-exist ;  exit 0 ; fi

  OBJS=`ar t $FILE1`
  ar x $FILE1  
  for OBJ in $OBJS ; do gdis $OBJ >$OBJ.tmp1 ;done  	

  OBJS=`ar t $FILE2`
  ar x $FILE2  
  for OBJ in $OBJS ; do gdis $OBJ >$OBJ.tmp2 ;done  	

  for OBJ in $OBJS
  do
    if test "`diff $OBJ.tmp1 $OBJ.tmp2`" ;then 
      echo "  $OBJ \t:unmatch!"
      diff $OBJ.tmp1 $OBJ.tmp2 > lastdiff.error
      exit 0 
    else
      echo "  $OBJ \t:match"
      rm -f $OBJ.tmp1 $OBJ.tmp2 $OBJ
    fi
  done

echo "conglatulations! v(^_^)v"