4 # This script is used to compare the contents of repository directory trees.
5 # It is used by the Testcimmof Makefile which builds one copy of the repository
6 # with cimmofl and another with cimmof. The two repositories are expected to
7 # have the same contents.
9 # Usage: diffscript repository-dir repository-subdir
11 # The repository-dir argument is the directory containing the two repositories
12 # to compare. They are expected to be named "repository" and "repository.old".
13 # the repository-subdir is a specific subdirectory to compare within the
14 # repositories. The net effect is a comparison of these two directories:
16 # <repository-dir>/repository/<repository-subdir>
17 # <repository-dir>/repository.old/<repository-subdir>
19 echo "Comparing Repository files..."
23 for i in `find ./ -type f`
25 echo "Comparing " $i >> repository.log
26 diff $i ../../../repository.old/$2/$i >> repository.log
29 echo "Files are different" >> repository.log
32 if [ retCode -eq 1 ] ;then
33 echo +++ Test failed +++
35 echo +++ Test passed +++