build: Make eat use the latest zip in $OUT
* Fixes weird issues with timestamp differences
Change-Id: Ibeb0c5043b646faab6ce372290acf7efb4f22e15
diff --git a/build/envsetup.sh b/build/envsetup.sh
index 24ae320..a418d21 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -102,9 +102,7 @@
function eat()
{
if [ "$OUT" ] ; then
- MODVERSION=$(get_build_var LINEAGE_VERSION)
- ZIPFILE=lineage-$MODVERSION.zip
- ZIPPATH=$OUT/$ZIPFILE
+ ZIPPATH=`ls -tr "$OUT"/lineage-*.zip | tail -1`
if [ ! -f $ZIPPATH ] ; then
echo "Nothing to eat"
return 1