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
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
10 # rats: how did i set up that archive?
11 # we need to have those steps someplace.
12 # the remote config is like this so far:
14 #fred@serene $ git remote -v
15 #origin ssh://fred_t_hamster@git.code.sf.net/p/feistymeow/trunk (fetch)
16 #origin ssh://fred_t_hamster@git.code.sf.net/p/feistymeow/trunk (push)
17 #upstream git@feistymeow.org:feisty_meow (fetch)
18 #upstream git@feistymeow.org:feisty_meow (push)
20 # so, we've got it hooked together with a named remote called "upstream" that is
21 # actually our source location, and the target is actually the "origin" remote for
26 if [ -z "$dir" ]; then
30 # this file needs to have our sourceforge password in it.
31 PASSWORD_FILE="$HOME/.secrets/sourceforge_password"
33 if [ ! -f "$PASSWORD_FILE" ]; then
34 echo "This script requires a password stored in the file:"
35 echo " $PASSWORD_FILE"
41 git merge upstream/master
43 git push origin master <"$PASSWORD_FILE"