aboutsummaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorLuca Stefani <luca020400@lineageos.org>2017-08-17 19:21:23 (GMT)
committerRashed Abdel-Tawab <rashed@linux.com>2018-08-11 00:20:46 (GMT)
commit9f61cd2b702efe369ffed5998aa531d1601d4f1c (patch)
treed287b3041ac1cfc752474de62a46aa5c098f0e23 /envsetup.sh
parent22dec2e70ab0ea15b0919055ff0d1d44bdfbb030 (diff)
downloadandroid_build-9f61cd2b702efe369ffed5998aa531d1601d4f1c.zip
android_build-9f61cd2b702efe369ffed5998aa531d1601d4f1c.tar.gz
android_build-9f61cd2b702efe369ffed5998aa531d1601d4f1c.tar.bz2
build: Add Lineage build supportrefs/changes/32/222732/9
Squashed also with the following changes: Author: Luca Stefani <luca020400@lineageos.org> Date: Thu Aug 17 22:22:13 2017 +0200 core: Include Lineage pathmap Change-Id: Ie25dee383cc5bc9bb6390cff2cb2460d526d80b6 Author: Simon Shields <simon@lineageos.org> Date: Fri Mar 2 12:55:47 2018 +1100 build: unconditionally use lineage pathmap even if we're not building a lineage target, we need to use the lineage pathmap to make things like recovery and ril happy Change-Id: I974c30ad10d4ff5b7805c3df9c22010f1e002bf1 Change-Id: Iab8b2ef8b644a7bea10bfd28b99d9e69539b1357
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 5fa936f..166c6c7 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -137,6 +137,14 @@ function check_product()
echo "Couldn't locate the top of the tree. Try setting TOP." >&2
return
fi
+ if (echo -n $1 | grep -q -e "^lineage_") ; then
+ LINEAGE_BUILD=$(echo -n $1 | sed -e 's/^lineage_//g')
+ export BUILD_NUMBER=$( (date +%s%N ; echo $LINEAGE_BUILD; hostname) | openssl sha1 | sed -e 's/.*=//g; s/ //g' | cut -c1-10 )
+ else
+ LINEAGE_BUILD=
+ fi
+ export LINEAGE_BUILD
+
TARGET_PRODUCT=$1 \
TARGET_BUILD_VARIANT= \
TARGET_BUILD_TYPE= \
@@ -623,6 +631,8 @@ function lunch()
return 1
fi
+ check_product $product
+
TARGET_PRODUCT=$product \
TARGET_BUILD_VARIANT=$variant \
TARGET_PLATFORM_VERSION=$version \