summaryrefslogtreecommitdiffstats
path: root/generate-xdeltas.sh
blob: 2353a6bd8de119f0ce1545d4f3366fe94a85eeea (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
#!/bin/sh
#
# Script to generate xdelta diffs 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
#

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-Delta-work"
DSTDIR="$HOME/KDE-Delta"

PACKAGES="tdeaddons tdeadmin tdeartwork tdebase tdebindings tdeedu tdegames tdegraphics \
          tdelibs tdemultimedia tdenetwork tdepim tdesdk tdetoys tdeutils"

# tde-i18n
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
mkdir -p $DSTDIR/tde-i18n

        # kde sources
cd $WRKDIR
for package in $PACKAGES; do
        echo -e "Decompressing $package-$OLDVER"
        cp $OLDDIR/$package-$OLDVER.tar.bz2 .
        bunzip2 $package-$OLDVER.tar.bz2
        echo -e "Decompressing $package-$NEWVER"
        cp $NEWDIR/$package-$NEWVER.tar.bz2 .
        bunzip2 $package-$NEWVER.tar.bz2
        
        echo -e "Diffing $package"
        xdelta delta -9 $package-$OLDVER.tar $package-$NEWVER.tar $DSTDIR/patch-$package-$OLDVER-$NEWVER
        
        rm $package-$OLDVER.tar
        rm $package-$NEWVER.tar
done

        # i18n
cd $WRKDIR
for package in $I18N_PACKAGES; do
        package=tde-i18n-$package
        
        echo -e "Decompressing $package-$OLDVER"
        cp $OLDDIR/tde-i18n/$package-$OLDVER.tar.bz2 .
        bunzip2 $package-$OLDVER.tar.bz2
        echo -e "Decompressing $package-$NEWVER"
        cp $NEWDIR/tde-i18n/$package-$NEWVER.tar.bz2 .
        bunzip2 $package-$NEWVER.tar.bz2
        echo -e "Diffing $package"
        xdelta delta -9 $package-$OLDVER.tar $package-$NEWVER.tar	 $DSTDIR/tde-i18n/patch-$package-$OLDVER-$NEWVER
        
        rm $package-$OLDVER.tar
        rm $package-$NEWVER.tar
done