~ubuntu-langpack/langpack-o-matic/main

« back to all changes in this revision

Viewing changes to cron.daily.rtm

  • Committer: Sebastien Bacher
  • Date: 2021-11-22 16:04:05 UTC
  • mfrom: (594.2.1 langpack-o-matic)
  • Revision ID: seb128@ubuntu.com-20211122160405-17hx41i98tvg459q
The repository has been moved to git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
 
3
 
# this is part of langpack-o-matic
4
 
#
5
 
# (C) 2014-2015 Canonical Ltd.
6
 
# Author: Martin Pitt <martin.pitt@canonical.com>
7
 
#
8
 
# Build update packages for the release given as first argument; stable-updates
9
 
# will be uploaded to PPA, devel release will be uploaded straight into the
10
 
# Ubuntu archive.
11
 
 
12
 
release="$1"
13
 
[ -n "$release" ] || {
14
 
    echo "Usage: $0 <release>" >&2
15
 
    exit 1
16
 
}
17
 
 
18
 
unset LANG
19
 
 
20
 
cd $(dirname $0)
21
 
 
22
 
if test -s updated-packages; then
23
 
    echo "updated-packages is nonzero, please clean up first" >&2
24
 
    exit 1
25
 
fi
26
 
 
27
 
# download the overlay full, vivid full and vivid delta tarballs and merge them together
28
 
TAR=ubuntu-rtm-${release%-*}-translations.tar.gz
29
 
TARVF=ubuntu-vivid-translations.tar.gz
30
 
TARVD=ubuntu-vivid-translations-update.tar.gz
31
 
TARM=ubuntu-rtm-${release%-*}-translations-merged.tar.gz # merged tarball output
32
 
rm -f $TAR $TARVF $TARVD $TARM
33
 
wget --no-check-certificate -q -O $TAR https://translations.launchpad.net/ubuntu-rtm/${release%-*}/+latest-full-language-pack
34
 
wget --no-check-certificate -q -O $TARVF https://translations.launchpad.net/ubuntu/vivid/+latest-full-language-pack
35
 
wget --no-check-certificate -q -O $TARVD https://translations.launchpad.net/ubuntu/vivid/+latest-delta-language-pack
36
 
 
37
 
test -e $TAR -a -e $TARVF -a -e $TARVD || {
38
 
    echo "Could not download one of the tarballs" >&2
39
 
    exit 1
40
 
}
41
 
 
42
 
# merge the tarballs to $TARM
43
 
./merge-tarballs $TARVF $TARVD $TAR $TARM
44
 
 
45
 
dir=../${release/updates/proposed}
46
 
if [ -d $dir ]; then
47
 
    rm -rf ${dir}.prev
48
 
    mv ${dir} ${dir}.prev
49
 
fi
50
 
mkdir -p ${dir} ../logs
51
 
./import --distribution=ubuntu-rtm -v --class touch --pkglist maps/pkglist-touch-${release%-*} --treshold=70 --min-priority=1500 $TARM ${release/updates/proposed} $dir > ../logs/${release}-touch.log 2>&1
52
 
 
53
 
if [ "${release%-updates}" = "$release" ]; then
54
 
    # development release, upload straight to archive
55
 
    target="rtm"
56
 
else
57
 
    echo "Uploads to -updates are not currently implemented" >&2
58
 
    exit 1
59
 
fi
60
 
 
61
 
# work-around the ubuntu-rtm/15.04 hacks by changing the changelog release to vivid
62
 
find $dir/sources-touch -name changelog -exec sed -i 's/ 15.04;/ vivid;/' "{}" \;
63
 
 
64
 
./packages upload $target > ../logs/rtm-$release-upload.log 2>&1
65
 
rm -f $TAR $TARVF $TARVD $TARM
66
 
 
67
 
# request full export the next time
68
 
lib/lp-request-full-export.py ubuntu-rtm 15.04