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

« back to all changes in this revision

Viewing changes to update-support

  • Committer: martin at piware
  • Date: 2006-03-31 16:41:18 UTC
  • Revision ID: martin@piware.de-20060331164118-52f2fc52123bd727
state for breezy final

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
# this is part of langpack-o-matic, by Martin Pitt <martin.pitt@canonical.com>
 
4
#
 
5
# (C) 2005 Canonical Ltd.
 
6
# Author: Martin Pitt <martin.pitt@canonical.com>
 
7
#
 
8
# Updates a language-support-%PKGNAME% source package after the supplemental
 
9
# dependencies changed.
 
10
#
 
11
# After this script finishes successfully, the source package path will be
 
12
# written to "updated-packages".
 
13
#
 
14
# Usage: update-depends <language> <distro-release>
 
15
 
 
16
import sys, os, os.path, time
 
17
 
 
18
# change working directory to the directory of this script
 
19
os.chdir(os.path.dirname(sys.argv[0]))
 
20
 
 
21
sys.path.append('lib')
 
22
import macros, makepkg
 
23
 
 
24
if len(sys.argv) != 3:
 
25
    print >> sys.stderr, 'Usage:', sys.argv[0], '<language> <distro release>'
 
26
    sys.exit(-1)
 
27
 
 
28
locale = sys.argv[1]
 
29
release = sys.argv[2]
 
30
 
 
31
# verify release and create config file
 
32
basepath = '../' + release
 
33
if not os.path.isdir(basepath):
 
34
    raise OSError, 'Invalid distribution release, %s does not exist' % basepath
 
35
 
 
36
macr = macros.LangpackMacros(locale, '', release, time.strftime('%Y%m%d'))
 
37
pkg = macr.subst_string(basepath+'/sources-support/language-support-%PKGNAME%')
 
38
makepkg.make_pkg('skel-support', pkg, macr)
 
39