Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 88e40337 authored by Koushik Dutta's avatar Koushik Dutta Committed by Michael Bestas
Browse files

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
parent 3fb63815
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -832,7 +832,20 @@ function lunch()
        return 1
    fi

    if ! check_product $product
    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
    else
        T=$(gettop)
        cd $T > /dev/null
        vendor/lineage/build/tools/roomservice.py $product true
        cd - > /dev/null
    fi

    TARGET_PRODUCT=$product \
    TARGET_BUILD_VARIANT=$variant \
@@ -844,6 +857,15 @@ function lunch()
        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 TARGET_PRODUCT)