#!/bin/bash gitpushworkinguser=`git config openils.pushworkinguser` gitpushworkingrepo=`git config openils.pushworkingrepo || echo working` if [ "$gitpushworkinguser" == "" ]; then echo "ERROR: Username not filled in"; echo "Try git config openils.pushworkinguser username"; exit 2; fi if [ -z "$1" ]; then echo "Usage: git pushcollab []"; exit 1; fi gitpushworkinglocalbranch=${1%%:*} gitpushworkingremotebranch=${2-${1#+}} git push $gitpushworkingrepo $gitpushworkinglocalbranch:collab/$gitpushworkinguser/${gitpushworkingremotebranch##*:}