findMissingFiles 822 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #! /bin/sh
  2. # $XConsortium: findMissingFiles /main/4 1996/08/27 10:11:14 drk $
  3. # find missing files that a fileset sez we should be delivering
  4. # desparately need a list of filesets delivered for each product
  5. usage ()
  6. {
  7. echo "usage: $PRGNAME -tree buildtree filesets"
  8. echo " Uses .db from current directory."
  9. }
  10. PRGNAME=$0
  11. if [ $# -lt 3 ]
  12. then
  13. usage
  14. exit 1
  15. fi
  16. buildtree=$2
  17. shift 2
  18. if [ ! -d $buildtree ]
  19. then
  20. if [ ! -d /x/$buildtree ]
  21. then
  22. echo Cannot find $buildtree or /x/$buildtree
  23. usage
  24. exit 2
  25. else
  26. buildtree=/x/$buildtree
  27. fi
  28. fi
  29. for fileset in $@
  30. do
  31. if [ -r $fileset.db ]
  32. then
  33. echo ${fileset}:
  34. for file in `fgrep a_out_location $fileset.db | cut -sf 2 -d \: `
  35. do
  36. [ -r $buildtree/$file ] || echo " $file"
  37. done
  38. else
  39. echo $fileset.db not found
  40. fi
  41. done