~cjwatson/launchpad-buildd/translation-merge-states

« back to all changes in this revision

Viewing changes to bin/generate-translation-templates

  • Committer: Colin Watson
  • Date: 2017-09-08 14:40:23 UTC
  • Revision ID: cjwatson@canonical.com-20170908144023-a6xuxwj1694q3924
Merge TranslationTemplatesBuildState.{INSTALL,GENERATE} into a single
state.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
 
# Copyright 2010,2011 Canonical Ltd.  This software is licensed under the
 
3
# Copyright 2010-2017 Canonical Ltd.  This software is licensed under the
4
4
# GNU Affero General Public License version 3 (see the file LICENSE).
5
5
 
6
6
# Buildd Slave tool to generate translation templates. Boiler plate code
53
53
   $1 || echo "Got error $? from '$1'."
54
54
}
55
55
 
 
56
$SUDO $CHROOT $BUILD_CHROOT apt-get install -y bzr intltool || exit 200
 
57
 
56
58
# Copy pottery files to chroot.
57
59
debug_exec "$SUDO $MKDIR -vp $BUILD_CHROOT$PYMODULES/$BUILDD_PACKAGE"
58
60
debug_exec "$SUDO $TOUCH $BUILD_CHROOT$PYMODULES/$BUILDD_PACKAGE/__init__.py"
63
65
# Enter chroot, switch back to unprivileged user, execute the generate script.
64
66
$SUDO $CHROOT $BUILD_CHROOT \
65
67
  $SU - $USER \
66
 
    -c "PYTHONPATH=$PYMODULES $GENERATE_SCRIPT $BRANCH_URL $RESULT_NAME"
 
68
    -c "PYTHONPATH=$PYMODULES $GENERATE_SCRIPT $BRANCH_URL $RESULT_NAME" \
 
69
  || exit 201