- godir: Go to the directory containing a file.
- cmremote: Add git remote for CM Gerrit Review
- cmgerrit: A Git wrapper that fetches/pushes patch from/to CM Gerrit Review
+- aospremote: Add git remote for matching AOSP repository
- cmrebase: Rebase a Gerrit change and push it again
- mka: Builds using SCHED_BATCH on all processors
- reposync: Parallel repo sync using ionice and SCHED_BATCH
}
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