envsetup: Add githubremote function

* Useful for picking changes from our repositories
  to AOSP based repositories before forking them

Change-Id: I4f1d733354591fd3db431dd590ccf46e12f6a342
gugelfrei
Michael Bestas 6 years ago committed by Sam Mortimer
parent dab1569b81
commit a504aa4498

@ -10,6 +10,7 @@ Additional LineageOS functions:
- lineageremote: Add git remote for LineageOS Gerrit Review.
- aospremote: Add git remote for matching AOSP repository.
- cafremote: Add git remote for matching CodeAurora repository.
- githubremote: Add git remote for LineageOS Github.
- mka: Builds using SCHED_BATCH on all processors.
- mkap: Builds the module(s) using mka and pushes them to the device.
- cmka: Cleans and builds using mka.
@ -343,6 +344,27 @@ function cafremote()
echo "Remote 'caf' created"
}
function githubremote()
{
if ! git rev-parse --git-dir &> /dev/null
then
echo ".git directory not found. Please run this from the root directory of the Android repository you wish to set up."
return 1
fi
git remote rm github 2> /dev/null
local REMOTE=$(git config --get remote.aosp.projectname)
if [ -z "$REMOTE" ]
then
REMOTE=$(git config --get remote.caf.projectname)
fi
local PROJECT=$(echo $REMOTE | sed -e "s#platform/#android/#g; s#/#_#g")
git remote add github https://github.com/LineageOS/$PROJECT
echo "Remote 'github' created"
}
function installboot()
{
if [ ! -e "$OUT/recovery/root/etc/recovery.fstab" ];

Loading…
Cancel
Save