OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

  1. #!/bin/bash
  2. #
  3. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  4. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  5. #
  6. # Filename: scripts/Create-DescPatch
  7. # Copyright (C) 2006 - 2008 The OpenSDE Project
  8. # Copyright (C) 2004 - 2006 The T2 SDE Project
  9. # Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # More information can be found in the files COPYING and README.
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; version 2 of the License. A copy of the
  16. # GNU General Public License can be found in the file COPYING.
  17. # --- SDE-COPYRIGHT-NOTE-END ---
  18. if [ "$1" = "-repository" ] ; then
  19. shift ; for y ; do
  20. for x in package/$y/[a-z0-9]* ; do $0 ${x##*/} ; done
  21. done
  22. exit 0
  23. fi
  24. if [ "$1" != "${1#-}" -o $# -eq 0 ] ; then
  25. echo "Usage: $0 <package-names>"
  26. echo "or $0 -repository <repository-names>"
  27. exit 1
  28. fi
  29. for package ; do
  30. lastpdir=
  31. for pdir in package/*/$package ; do
  32. [ "$lastpdir" ] && echo "$package: Found dup: $pdir $lastpdir"
  33. lastpdir="$pdir"
  34. done
  35. if [ -f $pdir/$package.desc ] ; then
  36. tempfn=`mktemp`
  37. { echo ; nl=0
  38. while read line ; do
  39. if [ "$line" = "--" -a "$nl" = 0 ] ; then
  40. echo ; nl=1
  41. fi
  42. if [ "${line#\[}" != "$line" ] ; then
  43. for x in $line ; do
  44. x="`echo $x | tr -d '[]'`"
  45. grep "^\[$x\]" $pdir/$package.desc && nl=0
  46. done
  47. fi
  48. done < etc/desc_format
  49. if [ "$nl" = 0 ] ; then echo ; fi
  50. grep "^\[X" $pdir/$package.desc && echo
  51. } > $tempfn
  52. diff -u ./$pdir/$package.desc $tempfn
  53. rm -f $tempfn
  54. fi
  55. done