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

« back to all changes in this revision

Viewing changes to cron.daily

  • 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) 2005 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
 
TAR=ubuntu-${release%-*}-translations-update.tar.gz
28
 
rm -f $TAR
29
 
wget --no-check-certificate -q -O $TAR https://translations.launchpad.net/ubuntu/${release%-*}/+latest-delta-language-pack
30
 
test -e $TAR || {
31
 
    echo "Could not download $TAR" >&2
32
 
    exit 1
33
 
}
34
 
 
35
 
mkdir -p ../logs ../${release/updates/proposed}
36
 
./import --update --treshold=5 -v $TAR ${release/updates/proposed} ../${release/updates/proposed} > ../logs/$release.log 2>&1
37
 
 
38
 
if [ "${release%-updates}" = "$release" ]; then
39
 
    # development release, upload straight to archive
40
 
    target=""
41
 
else
42
 
    # stable releases, upload to PPA
43
 
    target="ppa"
44
 
fi
45
 
 
46
 
./packages upload $target > ../logs/$release-upload.log 2>&1
47
 
rm $TAR