~fboucault/qtcreator-plugin-ubuntu/newarch_arm64

« back to all changes in this revision

Viewing changes to share/qtcreator/ubuntu/scripts/click_create_target

  • Committer: Benjamin Zeller
  • Date: 2016-06-08 15:09:39 UTC
  • mfrom: (443.2.36 ubuntu)
  • Revision ID: benjamin.zeller@canonical.com-20160608150939-v4ffv2a9xy5lcr5s
LXD rewrite for building and running apps in LXD containers

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
# Copyright 2014 Canonical Ltd.
3
 
#
4
 
# This program is free software; you can redistribute it and/or modify
5
 
# it under the terms of the GNU Lesser General Public License as published by
6
 
# the Free Software Foundation; version 2.1.
7
 
#
8
 
# This program is distributed in the hope that it will be useful,
9
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
# GNU Lesser General Public License for more details.
12
 
#
13
 
# You should have received a copy of the GNU Lesser General Public License
14
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
#
16
 
# Author: Benjamin Zeller <zeller.benjamin@canonical.com>
17
 
 
18
 
ARCHITECTURE=$1
19
 
FRAMEWORK=$2
20
 
SERIES=$3
21
 
NAME=$4
22
 
SCRIPTPATH=$(dirname $0)
23
 
 
24
 
click chroot -a $ARCHITECTURE -f $FRAMEWORK -n $NAME exists
25
 
 
26
 
if [ $? -eq 0 ]
27
 
then
28
 
        echo "The click target ${NAME}-${FRAMEWORK}-${ARCHITECTURE} exists already"
29
 
        exit 1
30
 
fi
31
 
 
32
 
click chroot -a $ARCHITECTURE -f $FRAMEWORK -n $NAME create
33
 
 
34
 
if [ $? -eq 0 ]
35
 
then
36
 
    echo "The click target was created successfully, installing required packages"
37
 
 
38
 
    click chroot -a $ARCHITECTURE -f $FRAMEWORK  -n $NAME maint apt-get install -y cmake
39
 
 
40
 
    exit 0
41
 
fi
42
 
 
43
 
echo "There was an error creating the click target, cleaning up"
44
 
 
45
 
"${SCRIPTPATH}/click_destroy_target" ${ARCHITECTURE} ${FRAMEWORK} ${SERIES} ${NAME}
46
 
 
47
 
exit 1