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/release/dosnapshot

65 lines
1.4 KiB

#! /bin/sh
umask 022
export VERBOSE=yes
export DOINGSNAPSHOT=yes
renice 20 $$ &>/dev/null
(cd ~/prod && svn up -N)
# lets go work
cd ~/prod
rm -rf sources-old
mkdir sources-old
mkdir sources-old/kde-l10n
# now lets populate the directory
for i in `cat snapmodules`; do
t=`readlink "ftp/$i.tar.bz2"`
if test -n "$t"; then
test -r "ftp/$t" && ln -s "../ftp/$t" sources-old
else
echo "ERROR: $i does not exist in ftp/.";
fi
done
rm -rf sources
mkdir sources
mkdir sources/kde-l10n
version=`date +%y%m%d`
for i in `cat snapmodules`; do
(
test -d clean/$i || { echo "$i doesn't exist"; exit 1; }
oldrev=`readlink ftp/$i.tar.bz2 | egrep -o '[0-9]+\.tar\.bz2' | cut -d. -f1`
test -n "$oldrev" || oldrev=0
( cd clean/$i && svn up >/dev/null )
newrev=`svn info clean/$i | grep 'Last Changed Rev:' | cut -d' ' -f4`
if test "$oldrev" -ne "$newrev"; then
./pack $i $newrev
set -x
rm -f ftp/$i*bz2
mv -f sources/$i*bz2 ftp
ln -s $i-$newrev.tar.bz2 ftp/$i.tar.bz2
find ftp/ -name "$i*xdelta" -mtime +7 | xargs rm -f
mv -f sources/$i*xdelta ftp
if test "$i" = "kde-l10n"; then
rm -f ftp/$i/$i*bz2
for ki in sources/$i/$i*bz2; do
mv $ki ftp/kde-l10n
ln -s `basename $ki` ftp/kde-l10n/`basename $ki -$newrev.tar.bz2`.tar.bz2
done
fi
set +x
else
echo "$i does not need to be updated"
fi
( cd dirty && rm -rf $i* )
)
done