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.
tde-common-other/generate-diffs.sh

75 lines
2.5 KiB

#!/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="tdeaddons tdeadmin tdeartwork tdebase tdebindings tdeedu tdegames tdegraphics \
tdelibs tdemultimedia tdenetwork tdepim tdesdk tdetoys tdeutils"
# tde-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=tde-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=tde-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=tde-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=tde-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=tde-i18n-$package
echo -e "Creating bins.tar for $package"
tar cf $DSTDIR/$package-$OLDVER-$NEWVER.bins.tar -T $WRKDIR/$package-$OLDVER-$NEWVER.bins
done