working on a way to get the source forge copy of feisty meow to
[feisty_meow.git] / scripts / rev_control / push_repo_upstream.sh
1 #!/bin/bash
2
3 # this script updates a "relay" repository (let us call it B) that is used
4 # to mirror things from repository A (the source) into another repository C
5 # (the target).
6 # this is useful, for example, to maintain one's own master git archive for
7 # a codebase, but also push updates for that codebase into a sourceforge git
8 # repository.
9 #
10 # rats: how did i set up that archive?
11 #       we need to have those steps someplace.
12
13 dir="$1"; shift
14 if [ -z "$dir" ]; then
15   dir=.
16 fi
17 certfile="$1"; shift
18 if [ -z "$certfile" ]; then
19   certfile=$HOME/.ssh/id_dsa_sourceforge
20 fi
21
22 pushd "$dir"
23 git fetch upstream
24 git merge upstream/master
25 git push origin master
26 popd