diff options
author | Steve Kondik <shade@chemlab.org> | 2012-09-17 11:33:18 -0700 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 16:12:02 -0700 |
commit | 873fa569d565553fab348d4af6dcbe137dc52511 (patch) | |
tree | 19e95f236e7c731db317edeef0e2c087a87b38aa /envsetup.sh | |
parent | ef363cd1d59b71c51664642c1a4d6b3bb9acb34a (diff) | |
download | build-873fa569d565553fab348d4af6dcbe137dc52511.zip build-873fa569d565553fab348d4af6dcbe137dc52511.tar.gz build-873fa569d565553fab348d4af6dcbe137dc52511.tar.bz2 |
build: Add "aospremote" command
* Adds the git remote for the matching AOSP repository.
Change-Id: Iad03fb95874ff39a39083218aec0d834e82b4480
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh index bd22cfa..8c82b8d 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -23,6 +23,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - cmremote: Add git remote for CM Gerrit Review - cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit Review - cmrebase: Rebase a Gerrit change and push it again +- aospremote: Add git remote for matching AOSP repository - mka: Builds using SCHED_BATCH on all processors - reposync: Parallel repo sync using ionice and SCHED_BATCH @@ -1606,6 +1607,23 @@ function cmremote() } export -f cmremote +function aospremote() +{ + git remote rm aosp 2> /dev/null + if [ ! -d .git ] + then + echo .git directory not found. Please run this from the root directory of the Android repository you wish to set up. + fi + PROJECT=`pwd | sed s#$ANDROID_BUILD_TOP/##g` + if (echo $PROJECT | grep -qv "^device") + then + PFX="platform/" + fi + git remote add aosp https://android.googlesource.com/$PFX$PROJECT + echo "Remote 'aosp' created" +} +export -f aospremote + function makerecipe() { if [ -z "$1" ] then |