# # diffscript # # This script is used to compare the contents of repository directory trees. # It is used by the Testcimmof Makefile which builds one copy of the repository # with cimmofl and another with cimmof. The two repositories are expected to # have the same contents. # # Usage: diffscript repository-dir repository-subdir # # The repository-dir argument is the directory containing the two repositories # to compare. They are expected to be named "repository" and "repository.old". # the repository-subdir is a specific subdirectory to compare within the # repositories. The net effect is a comparison of these two directories: # # /repository/ # /repository.old/ echo "Comparing Repository files..." cd $1/repository/$2 rm -f repository.log retCode=0 for i in `find ./ -type f` do echo "Comparing " $i >> repository.log diff $i ../../../repository.old/$2/$i >> repository.log if [ $? -eq 1 ] ;then retCode=1 echo "Files are different" >> repository.log fi done if [ retCode -eq 1 ] ;then echo +++ Test failed +++ else echo +++ Test passed +++ fi