* updated xwayland (23.2.6 -> 23.2.7)
[t2sde.git] / scripts / Create-DescPatch
blob33728acee6c576ff21fbd0c0c4717257793818ac
1 #!/usr/bin/env bash
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # T2 SDE: scripts/Create-DescPatch
5 # Copyright (C) 2004 - 2023 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # This Copyright note is generated by scripts/Create-CopyPatch,
9 # more information can be found in the files COPYING and README.
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License version 2.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 if [ "$1" = "-repository" ]; then
16 shift; for y; do
17 for x in package/$y/[a-z0-9]*; do $0 ${x##*/}; done
18 done
19 exit 0
22 if [ "$1" != "${1#-}" -o $# -eq 0 ]; then
23 echo "Usage: $0 <package-names>"
24 echo "or $0 -repository <repository-names>"
25 exit 1
28 for package; do
29 lastpdir=""
30 for pdir in package/*/$package; do
31 [ "$lastpdir" ] && echo "$package: Found dup: $pdir $lastpdir"
32 lastpdir="$pdir"
33 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
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
48 done < misc/share/PKG-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
55 done