~ubuntu-branches/ubuntu/wily/language-pack-kde-ja/wily

« back to all changes in this revision

Viewing changes to debian/build-langpack.sh

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2014-01-20 11:29:50 UTC
  • Revision ID: package-import@ubuntu.com-20140120112950-05mncxmajz17nl56
Tags: 1:14.04+20140305.0ubuntu1
* Add README.source
* Add Vcs entries to debian/control
* Remove kdevelop/kdevplatform l10n as dependency. They are being pulled
  onto the ISO for no good reason.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
export COMMON_BRANCH="lp:~kubuntu-packagers/kubuntu-packaging/kubuntu-l10n-common"
 
4
export COMMON_DIR="common-l10n"
 
5
if [ ! -d $COMMON_DIR ]; then
 
6
    bzr co $COMMON_BRANCH $COMMON_DIR
 
7
else
 
8
    wd=`pwd`
 
9
    cd $COMMON_DIR
 
10
    bzr up
 
11
    cd $wd
 
12
fi
 
13
if [ ! -d $COMMON_DIR ]; then
 
14
    echo "failed to get kubuntu-l10n-common, cannot continue!"
 
15
    exit 1
 
16
fi
 
17
 
 
18
if ! source $COMMON_DIR/common ; then
 
19
    echo "could not source common functions!!"
 
20
    exit 1
 
21
fi
 
22
 
 
23
###################################
 
24
 
 
25
checkDependencies
 
26
cdMainDirectory "language-pack-kde-common"
 
27
 
 
28
includeConfig
 
29
ensureBranchIsPushed
 
30
 
 
31
exportDirectories
 
32
purgeBuildDirectory
 
33
initBuildDirectory
 
34
 
 
35
### TODO: configify
 
36
cd $BUILD_DIR
 
37
CO="common"
 
38
bzr branch lp:~kubuntu-packagers/kubuntu-packaging/language-pack-kde-common common
 
39
 
 
40
### TODO: configify somehow
 
41
latest_kde_version=`ssh ${REMOTE_HOST} ls ${REMOTE_HOME}/${TYPE} | grep -P "^\d.*" | sort -V | tail -1`
 
42
tar_files=`ssh ${REMOTE_HOST} ls ${REMOTE_HOME}/${TYPE}/${latest_kde_version}/src/kde-l10n/ | grep "kde-l10n-.*.tar.xz"`
 
43
 
 
44
for tar_file in $tar_files; do
 
45
    echo "looking at tar $tar_file"
 
46
 
 
47
    if [[ $tar_file =~ kde-l10n-(.*)-$latest_kde_version.tar.xz ]]; then
 
48
        exportCodeMappings ${BASH_REMATCH[1]}
 
49
    else
 
50
        echo "!!! SKIPPING $tar_file BECAUSE THE VERSION COULD NOT BE PARSED!!!"
 
51
        continue
 
52
    fi
 
53
 
 
54
    cd $BUILD_DIR
 
55
    bzr branch $CO language-pack-kde-$ubuntudep
 
56
 
 
57
    cd language-pack-kde-$ubuntudep/debian/
 
58
    for debian_file in `ls`; do
 
59
        gsubDebianFile $debian_file
 
60
    done
 
61
 
 
62
    bzr-buildpackage -S --builder "dpkg-buildpackage -S -us -uc"
 
63
done