Skip to content

Instantly share code, notes, and snippets.

@KhasMek
Created November 27, 2012 21:11
Show Gist options
  • Select an option

  • Save KhasMek/4157037 to your computer and use it in GitHub Desktop.

Select an option

Save KhasMek/4157037 to your computer and use it in GitHub Desktop.
project management or some crap.
#!/bin/bash
# Fuck more characters.
# I'm so fucking lazy
#set -x
remote=bcf
# PUSH TO HEAD ONLY IF YOU KNOW WHAT YOU'RE DOING
giggitty=refs/heads/jb-mr1
# url is usually something like
# ssh://john.doe@http://gerrit.sudoservers.com/:29418
url=gerrit
gspot=`pwd`
# get the directories of projects and nuke the first line
# (which is just the remote definition in the manifest)
grep $remote .repo/manifest.xml | cut -f2 -d '"' | sed 1d | while read line; do
if [ $line != platform_manifest ]; then
echo cd $line
cd $line
# the project needs to have the remote you're pushing to defined
project=`git config --get remote.aokp.projectname`
echo PROJECT: $project
echo git push "$url":"$project" HEAD:"$giggitty"
cd $gspot
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment