~ubuntu-branches/ubuntu/wily/apparmor-easyprof-ubuntu/wily

« back to all changes in this revision

Viewing changes to debian/make-new-version.sh

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge
  • Date: 2014-10-29 07:52:45 UTC
  • Revision ID: package-import@ubuntu.com-20141029075245-nm993mltnacssq52
Tags: 1.3.0
* debian/control:
  - add Vcs-Bzr and Vcs-Browser now that we have them
  - adjust Standards-Version
* add debian/make-new-version.sh and document how to use it
* create policy version 1.3
* adjust autopkgtests:
  - add tests for policy version 1.3
  - fix lintian warnings in naming of the tests
* debian/apparmor-easyprof-ubuntu.postinst: add #DEBHELPER# token

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Author: Jamie Strandboge <jamie@ubuntu.com>
 
3
# Copyright (C) 2013-2014 Canonical Ltd.
 
4
#
 
5
# This script is distributed under the terms and conditions of the GNU General
 
6
# Public License, Version 3 or later. See http://www.gnu.org/copyleft/gpl.html
 
7
# for details.
 
8
set -e
 
9
 
 
10
usage() {
 
11
    cat <<EOM
 
12
Usage: make-new-version.sh <previous> <new>
 
13
EOM
 
14
}
 
15
 
 
16
previous_version="$1"
 
17
if [ -z "$previous_version" ]; then
 
18
    usage
 
19
    exit 1
 
20
fi
 
21
new_version="$2"
 
22
if [ -z "$new_version" ]; then
 
23
    usage
 
24
    exit 1
 
25
fi
 
26
 
 
27
for i in policygroups templates ; do
 
28
    mkdir data/$i/ubuntu/"$new_version"
 
29
    cd data/$i/ubuntu/"$new_version"
 
30
    for j in ../"$previous_version"/* ; do
 
31
        ln -s $j `basename $j`
 
32
    done
 
33
    if [ "$i" = "templates" ]; then
 
34
        if [ ! -e "ubuntu-sdk" ]; then
 
35
            echo "WARN: could not find '$i/ubuntu/$new_version/ubuntu-sdk'"
 
36
            echo "      Skipping setting up 'default' symlink."
 
37
        else
 
38
            rm -f ./default
 
39
            ln -s ubuntu-sdk default
 
40
        fi
 
41
    fi
 
42
    cd - >/dev/null
 
43
done