indices.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #! /bin/sh
  2. basename=indices
  3. diffs_dir=diffs
  4. logfile=$basename.log
  5. stdout_file=$basename.out
  6. [ "z$srcdir" = 'z' ] && srcdir=.
  7. [ -d $diffs_dir ] || mkdir $diffs_dir
  8. echo "$basename" > $logfile
  9. : > $stdout_file
  10. [ -d index_split ] && rm -rf index_split
  11. [ -d $basename ] && rm -rf $basename
  12. mkdir $basename
  13. echo "perl -w -x $srcdir/../../texi2html.pl -conf-dir $srcdir/../indices/ -test -split chapter -init index_test.init --out $basename/ $srcdir/../indices/index_table.texi $srcdir/../indices/index_split.texi >> $stdout_file 2>$basename/${basename}.2" >> $logfile
  14. perl -w -x $srcdir/../../texi2html.pl -conf-dir $srcdir/../indices/ -test -split chapter -init index_test.init --out $basename/ $srcdir/../indices/index_table.texi $srcdir/../indices/index_split.texi >> $stdout_file 2>$basename/${basename}.2
  15. ret=$?
  16. if [ $ret != 0 ]; then
  17. echo "F: $basename/$basename.2"
  18. exit 1
  19. fi
  20. return_code=0
  21. for dir in ${basename} index_split; do
  22. if [ -d $srcdir/${dir}_res ]; then
  23. diff -u --exclude=CVS --exclude=.svn --exclude='*.png' -r "$srcdir/${dir}_res" "${dir}" 2>>$logfile > "$diffs_dir/$dir.diff"
  24. dif_ret=$?
  25. if [ $dif_ret != 0 ]; then
  26. echo "D: $diffs_dir/$dir.diff"
  27. return_code=1
  28. else
  29. rm "$diffs_dir/$dir.diff"
  30. fi
  31. else
  32. echo "no res: ${dir}_res"
  33. fi
  34. done
  35. exit $return_code