Skip to content

Commit 7cefcff

Browse files
committed
build: Add privateremote helper
Change-Id: I8f406d397914836ac1ac12a50f56263cfcf85b55
1 parent 4dafa48 commit 7cefcff

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

build/envsetup.sh

+16
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,22 @@ function githubremote()
322322
echo "Remote 'github' created"
323323
}
324324

325+
function privateremote()
326+
{
327+
if ! git rev-parse --git-dir &> /dev/null
328+
then
329+
echo ".git directory not found. Please run this from the root directory of the Android repository you wish to set up."
330+
return 1
331+
fi
332+
git remote rm private 2> /dev/null
333+
local REMOTE=$(git config --get remote.github.projectname)
334+
335+
local PROJECT=$(echo $REMOTE | sed -e "s#https://github.com/##g")
336+
337+
git remote add private [email protected]:$PROJECT.git
338+
echo "Remote 'private' created"
339+
}
340+
325341
function installboot()
326342
{
327343
if [ ! -e "$OUT/recovery/root/system/etc/recovery.fstab" ];

build/soong/bin/hmm

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Additional LineageOS functions:
1515
- aospremote: Add git remote for matching AOSP repository.
1616
- cloremote: Add git remote for matching CodeLinaro repository.
1717
- githubremote: Add git remote for LineageOS Github.
18+
- privateremote: Add git remote for Github with ssh access.
1819
- mka: Alias to "m".
1920
- mkap: Builds the module(s) using mka and pushes them to the device.
2021
- cmka: Cleans and builds using mka.

0 commit comments

Comments
 (0)