Updated French translation. (#4740)
[opentx.git] / launchpad / prepare.sh
blobdeeac7044ee6bdad0aa39d0c001b7519fb7a9d5a
1 #!/bin/sh
2 set -e
3 set -x
5 # $1 is distribution "trusty" OR "yakkety"
7 cd `dirname ${0}`
10 distro=${1%/}
12 . common/suffix
14 if [ -z ${distro} ] ; then
15 echo "Missing distribution name"
16 exit 1
19 if [ ! -d ${distro} ] ; then
20 echo "Files for ${distro} not found. Most likely unsupported distribution. Aborting..."
21 exit 1
24 echo "Preparing sources for ${distro}..."
26 # prepare debian directory
27 rm -f ../debian/*
28 mkdir -p ../debian/
29 cp common/* ../debian/
30 cp ${distro}/* ../debian/
32 echo "Editing rules to set version suffix to \"${suffix}\""
33 sed -i "s/__VERSION_SUFFIX__/${suffix}/g" ../debian/rules
35 # remove old package and prepare new one
36 cd ..
37 rm -f ../opentx-companion22_*${distro}*
38 debuild -S -sa -I -Ijenkins -Ilaunchpad -Idoc -I*.luac
40 echo "Use this command to upload to launchpad:"
41 echo " dput ppa:opentx-test/ppa opentx-companion22_<version>.changes"