Add roomservice
Partial squash of:
Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Sun, 1 Jan 2017 21:45:07 +0100
lunch: Use cd - instead of popd
* ZSH breaks a lot of things.
Change-Id: Idee8485bee673bebf6fe5857253306b20aa92eb5
Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date: Thu, 5 Jan 2017 16:30:15 +0100
build: Replace pushd with cd
* For consistency
Change-Id: I96711e3be7b73ebadd589f460e5c5e90d000a4f7
Author: Koushik Dutta <koushd@gmail.com>
Date: Sat, 26 Nov 2011 18:51:42 -0800
roomservice delivers you lunch combos from the CyanogenMod github.
fix roomservice formatting
support product names with _ in them
fix roomservice to handle pagination
Change-Id: I4923c2f768094dbad8e06a72d9f27d46414030ab
Author: LuK1337 <priv.luk@gmail.com>
Date: Tue Apr 13 19:57:24 2021 +0200
envsetup: Fix the way we check check_product's return value
Change-Id: I5a2a4b7be5dfee198094902aaa2c9a8c27b97704
Change-Id: I5bb07944f558e3e5551ab65c97ecfa303609be57
diff --git a/envsetup.sh b/envsetup.sh
index 79a006a..3259fd0 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -495,6 +495,21 @@
return 1
fi
+ if ! check_product $product $release
+ then
+ # if we can't find a product, try to grab it off the LineageOS GitHub
+ T=$(gettop)
+ cd $T > /dev/null
+ vendor/lineage/build/tools/roomservice.py $product
+ cd - > /dev/null
+ check_product $product $release
+ else
+ T=$(gettop)
+ cd $T > /dev/null
+ vendor/lineage/build/tools/roomservice.py $product true
+ cd - > /dev/null
+ fi
+
_lunch_meat $product $release $variant
}
@@ -514,6 +529,15 @@
then
echo "Did you mean -${product/*_/}? (dash instead of underscore)"
fi
+ echo
+ echo "** Don't have a product spec for: '$product'"
+ echo "** Do you have the right repo manifest?"
+ product=
+ fi
+
+ if [ -z "$product" -o -z "$variant" ]
+ then
+ echo
return 1
fi
export TARGET_PRODUCT=$(_get_build_var_cached TARGET_PRODUCT)