blob: 0e7b0322581814d4e38ffc926670c70670c2d2b5 (
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
|
#! /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
|