~ubuntu-sdk-team/ubuntu-ui-toolkit/ellipticSubTitles

« back to all changes in this revision

Viewing changes to tests/packaging-sorting.sh

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2017-01-13 13:43:00 UTC
  • mfrom: (2153.1.5 uut.staging)
  • Revision ID: tarmac-20170113134300-6f7im9bzdd60l790
Add python3-debian to control.gles and harden package-sorting.sh.

Approved by ubuntu-sdk-build-bot, Timo Jyrinki.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#
16
16
# Author: Timo Jyrinki <timo.jyrinki@canonical.com>
17
17
 
 
18
# Get the current script directory (compatible with Bash and ZSH)
 
19
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}`
 
20
SCRIPT_DIR=`cd $SCRIPT_DIR && pwd`
 
21
 
 
22
SRC=$SCRIPT_DIR/..
18
23
# Ensure packaging has gone through wrap-and-sort command
19
 
 
20
 
if [ ! -f  "/usr/bin/wrap-and-sort" ] ; then
21
 
  echo "Please install 'devscripts' package"
22
 
  exit 1
23
 
fi
24
 
 
25
 
cd $(dirname $0)
26
24
tmpdir=$(mktemp -d)
27
 
cp -a ../debian $tmpdir
28
 
 
 
25
cp -a $SRC/debian $tmpdir
29
26
wrap-and-sort -a -t -d $tmpdir/debian/
30
 
# Verify control.gles which otherwise isn't picked up
31
 
wrap-and-sort -a -t -d $tmpdir/debian/ -f $tmpdir/debian/control.gles
 
27
[ $? == 2 ] && exit 2
 
28
# Note: control.gles may be moved in gles builds
 
29
if [ -f $tmpdir/debian/control.gles ] ; then
 
30
 # Verify control.gles which otherwise isn't picked up
 
31
 wrap-and-sort -a -t -d $tmpdir/debian/ -f $tmpdir/debian/control.gles
 
32
fi
 
33
[ $? == 2 ] && exit 2
32
34
 
33
 
diff -urN ../debian $tmpdir/debian
 
35
diff -urN $SRC/debian $tmpdir/debian
34
36
 
35
37
if [ $? == 1 ] ; then
36
38
 echo 
37
39
 echo 
38
40
 echo "*******************************************************"
39
 
 echo "Please run 'wrap-and-sort -a -t' to clean up packaging."
 
41
 echo "Please run 'wrap-and-sort -a -t; wrap-and-sort -a -t -f debian/control.gles' to clean up packaging."
40
42
 echo "*******************************************************"
41
43
 echo 
42
44
 exit 1