Skip to content
Snippets Groups Projects
Commit 1a2b8ee7 authored by Michael Vines's avatar Michael Vines
Browse files

Locate patch directories dynamically

Change-Id: Ie557382f729d67a5222eec0cf0b26b11bd5bf694
parent 4e20fd1d
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,6 @@
# Environment variables influencing operation:
# B2G_TREE_ID - Defines the tree ID, used to determine which patches to
# apply. If unset, |treeid.sh| is run to identify the tree
# B2G_PATCH_DIRS_OVERRIDE - List of patch directories to be used instead of
# the build defaults.
# B2G_USE_REPO - If set, use |repo manifest| to determine when the Android
# tree has changed. Disabled by default for performance
# reasons.
......@@ -39,7 +37,6 @@
B2G_TREEID_SH=${B2G_TREEID_SH:-device/qcom/b2g_common/treeid.sh}
B2G_HASHED_FILES="${B2G_HASHED_FILES:-"device/qcom/b2g_common/vendorsetup.sh ${B2G_TREEID_SH}"}"
REPO="${REPO:-repo}"
B2G_PATCH_DIRS=${B2G_PATCH_DIRS_OVERRIDE:-device/qcom/b2g_common/patch}
__tree_md5sum()
{
......@@ -75,7 +72,23 @@ __patch_tree()
cd $(gettop)
local TREE_ID=${B2G_TREE_ID:-$(${B2G_TREEID_SH})}
local B2G_PATCH_DIRS=$( \
LANG=C sort -u <( \
test -d device && find -L device -maxdepth 4 -type d -name patch ; \
test -d vendor && find -L vendor -maxdepth 4 -type d -name patch \
) 2> /dev/null \
)
echo "Tree IDs: ${TREE_ID}"
echo "Patch directories: "
for d in ${B2G_PATCH_DIRS}; do
echo " $d"
done
if [[ -z "$B2G_PATCH_DIRS" ]]; then
exit
fi
set -e
local LASTMD5SUM=invalid
local MD5SUM=unknown
......@@ -258,10 +271,6 @@ rungdb()
( cd $(gettop)/device/qcom/b2g_common && ./run-gdb.sh $@ )
}
if [[ -f vendor/qcom/proprietary/b2g_common/vendorsetup.sh ]]; then
. vendor/qcom/proprietary/b2g_common/vendorsetup.sh
fi
if [[ -z $1 ]]; then
__patch_tree
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment