Made that grep for profile parameter in build_{tv,mobile} now always succeeds.
[platform/framework/web/chromium-efl.git] / tizen_src / build / build_tv.sh
1 #!/bin/bash
2
3 SCRIPTDIR=$(cd $(dirname $0); pwd -P)
4
5 # source common functions and vars
6 . `dirname ${BASH_SOURCE[0]}`/common.sh
7
8 ${SCRIPTDIR}/apply_patches.sh
9
10 # "|| :" means "or always succeeding built-in command"
11 PROFILE_NAME=$(echo "$@" | grep -Po "(?<=\-P\s)[^\s]*" || :)
12
13 if [ "$PROFILE_NAME" == "" ]; then
14   PROFILE_NAME=tztv_v2.2.1_prehawk
15   PROFILE_FLAG="-P $PROFILE_NAME"
16 fi
17
18 TIZEN_VERSION="chromium_efl_tizen_version 2.2.1"
19
20 if [ "$USE_GLOBAL_GBS_CONF" == "" ]; then
21   CONF_FLAG="--conf ${SCRIPTDIR}/gbs.conf"
22 fi
23
24 gbs $CONF_FLAG build $PROFILE_FLAG -A armv7l --incremental \
25     --extra-packs python-base-x86-arm,python-x86-arm,python-xml-x86-arm \
26     --define "${TIZEN_VERSION}" "$@"
27 GBS_RET=$?
28
29 ${SCRIPTDIR}/apply_patches.sh -r
30 APPLY_PATCHES_RET=$?
31
32 [ "$GBS_RET" != "0" ] && exit $GBS_RET
33 [ "$APPLY_PATCHES_RET" != "0" ] && exit $APPLY_PATCHES_RET
34 exit 0