Loading envsetup.sh +29 −2 Original line number Diff line number Diff line Loading @@ -1168,10 +1168,14 @@ function cmremote() fi GERRIT_REMOTE=$(cat .git/config | grep git://github.com | awk '{ print $NF }' | sed s#git://github.com/##g) if [ -z "$GERRIT_REMOTE" ] then GERRIT_REMOTE=$(cat .git/config | grep http://github.com | awk '{ print $NF }' | sed s#http://github.com/##g) if [ -z "$GERRIT_REMOTE" ] then echo Unable to set up the git remote, are you in the root of the repo? return 0 fi fi CMUSER=`git config --get review.review.cyanogenmod.com.username` if [ -z "$CMUSER" ] then Loading @@ -1181,6 +1185,29 @@ function cmremote() fi echo You can now push to "cmremote". } export -f cmremote function makerecipe() { if [ -z "$1" ] then echo "No branch name provided." return 1 fi cd android sed -i s/'default revision=.*'/'default revision="refs\/heads\/'$1'"'/ default.xml git commit -a -m "$1" cd .. repo forall -c ' if [ "$REPO_REMOTE" == "github" ] then pwd cmremote git push cmremote HEAD:refs/heads/'$1' fi ' } function cmgerrit() { if [ $# -eq 0 ]; then Loading Loading
envsetup.sh +29 −2 Original line number Diff line number Diff line Loading @@ -1168,10 +1168,14 @@ function cmremote() fi GERRIT_REMOTE=$(cat .git/config | grep git://github.com | awk '{ print $NF }' | sed s#git://github.com/##g) if [ -z "$GERRIT_REMOTE" ] then GERRIT_REMOTE=$(cat .git/config | grep http://github.com | awk '{ print $NF }' | sed s#http://github.com/##g) if [ -z "$GERRIT_REMOTE" ] then echo Unable to set up the git remote, are you in the root of the repo? return 0 fi fi CMUSER=`git config --get review.review.cyanogenmod.com.username` if [ -z "$CMUSER" ] then Loading @@ -1181,6 +1185,29 @@ function cmremote() fi echo You can now push to "cmremote". } export -f cmremote function makerecipe() { if [ -z "$1" ] then echo "No branch name provided." return 1 fi cd android sed -i s/'default revision=.*'/'default revision="refs\/heads\/'$1'"'/ default.xml git commit -a -m "$1" cd .. repo forall -c ' if [ "$REPO_REMOTE" == "github" ] then pwd cmremote git push cmremote HEAD:refs/heads/'$1' fi ' } function cmgerrit() { if [ $# -eq 0 ]; then Loading