Created
December 6, 2016 02:27
-
-
Save invisiblek/e57924d19d99ca4ad0eb58a387bd927d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export tag=7.1.1_r4 | |
rm -rf ~/merged_repos | |
repo forall -j16 -c ' | |
if [[ $REPO_PROJECT == CyanogenMod/* ]]; then | |
git remote rm aosp 2> /dev/null | |
p=$(echo $REPO_PROJECT | sed 's#CyanogenMod\/android_##g' | sed 's#CyanogenMod\/##g' | sed 's#_#/#g') | |
# we can safely ignore device,kernel and vendor repos. along with anything *-caf | |
if [[ ! $p == device* ]] && [[ ! $p == kernel* ]] && [[ ! $p == vendor* ]] && [[ ! $p == hudson ]] && [[ ! $REPO_PATH == *-caf* ]] && [[ ! $REPO_PATH == *cmsdk* ]] && [[ ! $REPO_PATH == *cyanogen* ]]; then | |
remote=https://android.googlesource.com/platform/$p | |
git remote add aosp $remote 2> /dev/null | |
fi | |
fi | |
if [[ ! "$remote" == "" ]]; then | |
response=`curl -o /dev/null --silent --head --write-out '%{http_code}' $remote` | |
if [[ $response == 200 ]]; then | |
git fetch aosp 2> /dev/null | |
if (git tag | grep -q $tag); then | |
echo $REPO_PATH >> ~/merged_repos | |
# git branch -D $tag 2> /dev/null | |
# repo start $tag . | |
# git merge $tag | |
fi | |
fi | |
fi | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment