blob: 3ee7cc9c5bf597c134b391f623d29cc2138d8bd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/bin/sh
#
# Script to generate diffs, bin.diffs and deleted files list for KDE and KDE i18n.
# Requires the source packages to be in $OLDDIR and $NEWDIR
# The resulting diffs will end up in $DSTDIR.
# $WRKDIR is used as work area
#
# Michael Brade <brade@informatik.uni-muenchen.de>
OLDVER=3.1rc5
NEWVER=3.1rc6
OLDDIR=/home/ftp/pub/kde/unstable/kde-3.1-rc5/src
NEWDIR=/home/ftp/pub/kde/unstable/kde-3.1-rc6/src
WRKDIR="$HOME/KDE-Diffs-work"
DSTDIR="$HOME/KDE-Diffs"
PACKAGES="kdeaddons kdeadmin kdeartwork kdebase kdebindings kdeedu kdegames kdegraphics \
kdelibs kdemultimedia kdenetwork kdepim kdesdk kdetoys kdeutils"
# kde-i18n
#PACKAGES="af ar bg bs ca cs da de el en_GB eo es et fa fi fr he hu it ja lt mt nb nl \
# nn nso pl pt pt_BR ro ru sk sl sr sv ta th tr uk ven vi xh zh_CN zh_TW zu"
mkdir -p $WRKDIR
mkdir -p $DSTDIR
cd $WRKDIR
for package in $PACKAGES; do
# i18n
# package=kde-i18n-$package
# kde sources
echo -e "Unpacking $package-$OLDVER"
tar xjf $OLDDIR/$package-$OLDVER.tar.bz2
echo -e "Unpacking $package-$NEWVER"
tar xjf $NEWDIR/$package-$NEWVER.tar.bz2
echo -e "Diffing $package"
diff -dr -u0 $package-$OLDVER $package-$NEWVER > $DSTDIR/$package-$OLDVER-$NEWVER.diff
done
echo -e "\n"
cd $DSTDIR
for package in $PACKAGES; do
# package=kde-i18n-$package;
echo -e "Looking for diffing bins in $package"
fgrep "Binary files $package-$OLDVER" $package-$OLDVER-$NEWVER.diff | awk -F' and ' '{ print $2 }' | awk -F' differ' '{ print $1 }' > $WRKDIR/$package-$OLDVER-$NEWVER.bins
done
cd $DSTDIR
for package in $PACKAGES; do
# package=kde-i18n-$package;
echo -e "Looking for new files in $package"
fgrep "Only in $package-$NEWVER" $package-$OLDVER-$NEWVER.diff | sed s/"Only in "// | sed s/"\: "/"\/"/ > $WRKDIR/$package-$OLDVER-$NEWVER.new
cd $WRKDIR
cat $package-$OLDVER-$NEWVER.new >> $package-$OLDVER-$NEWVER.bins
done
cd $DSTDIR
for package in $PACKAGES; do
# package=kde-i18n-$package;
echo -e "Looking for deleted files in $package"
fgrep "Only in $package-$OLDVER" $package-$OLDVER-$NEWVER.diff | sed s/"Only in "// | sed s/"\: "/"\/"/ > $DSTDIR/$package-$OLDVER-$NEWVER.deleted
done
cd $WRKDIR
for package in $PACKAGES; do
# package=kde-i18n-$package
echo -e "Creating bins.tar for $package"
tar cf $DSTDIR/$package-$OLDVER-$NEWVER.bins.tar -T $WRKDIR/$package-$OLDVER-$NEWVER.bins
done
|