summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-10-27 13:34:36 -0700
committerAdnan Begovic <adnan@cyngn.com>2015-10-06 16:28:36 -0700
commit20c21d24f8aec25f7c99067fdb8c1731600b7011 (patch)
tree3421125355300e2c969d64cdbe947813475f7cf8 /envsetup.sh
parentb2e690291fd4b0ee08f75178e2d73facadb466d9 (diff)
downloadbuild-20c21d24f8aec25f7c99067fdb8c1731600b7011.zip
build-20c21d24f8aec25f7c99067fdb8c1731600b7011.tar.gz
build-20c21d24f8aec25f7c99067fdb8c1731600b7011.tar.bz2
build: Add cafremote command to envsetup
* So lazy! Change-Id: I99a988180abb4fb486d4ebbb842bb9eda03bf1bc
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index e0b2c62..25c2a3e 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -25,6 +25,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
- 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
+- cafremote: Add git remote for matching CodeAurora repository.
- mka: Builds using SCHED_BATCH on all processors
- reposync: Parallel repo sync using ionice and SCHED_BATCH
- repopick: Utility to fetch changes from Gerrit.
@@ -1603,6 +1604,24 @@ function aospremote()
}
export -f aospremote
+function cafremote()
+{
+ git remote rm caf 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 caf git://codeaurora.org/$PFX$PROJECT
+ echo "Remote 'caf' created"
+}
+export -f cafremote
+
+
function installboot()
{
if [ ! -e "$OUT/recovery/root/etc/recovery.fstab" ];