early: fixed modprobe
[opensde-nopast.git] / scripts / Create-DescPatch
blobfd28179320d60ce2cb496309d46f836c15b1167c
1 #!/bin/bash
3 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
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
11 # More information can be found in the files COPYING and README.
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 ---
19 if [ "$1" = "-repository" ] ; then
20 shift ; for y ; do
21 for x in package/$y/[a-z0-9]* ; do $0 ${x##*/} ; done
22 done
23 exit 0
26 if [ "$1" != "${1#-}" -o $# -eq 0 ] ; then
27 echo "Usage: $0 <package-names>"
28 echo "or $0 -repository <repository-names>"
29 exit 1
32 for package ; do
33 lastpdir=
34 for pdir in package/*/$package ; do
35 [ "$lastpdir" ] && echo "$package: Found dup: $pdir $lastpdir"
36 lastpdir="$pdir"
37 done
39 if [ -f $pdir/$package.desc ] ; then
40 tempfn=`mktemp`
41 { echo ; nl=0
42 while read line ; do
43 if [ "$line" = "--" -a "$nl" = 0 ] ; then
44 echo ; nl=1
46 if [ "${line#\[}" != "$line" ] ; then
47 for x in $line ; do
48 x="`echo $x | tr -d '[]'`"
49 grep "^\[$x\]" $pdir/$package.desc && nl=0
50 done
52 done < etc/desc_format
53 if [ "$nl" = 0 ] ; then echo ; fi
54 grep "^\[X" $pdir/$package.desc && echo
55 } > $tempfn
56 diff -u ./$pdir/$package.desc $tempfn
57 rm -f $tempfn
59 done