]> git.madduck.net Git - code/myrepos.git/blob - mrconfig

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

500985f55f9b907eeed630a41504affbadab932a
[code/myrepos.git] / mrconfig
1 # An example config file for the mr(1) command.
2
3 [DEFAULT]
4 # Teach mr how to run svn cleanup.
5 cleanup = if [ -d "$MR_REPO"/.svn ]; then svn cleanup ; fi
6 # And how to run git gc and push.
7 gc = if [ -d "$MR_REPO"/.git ]; then git gc; fi
8 push = if [ -d "$MR_REPO"/.git ]; then git push; fi
9 # And how to list tags for git and svn.
10 tag = 
11         if [ -d "$MR_REPO"/.svn ]; then
12                 git tag
13         elsif [ -d "$MR_REPO"/.git ]; then
14                 url=$(LANG=C svn info . | grep -i ^URL: | cut -d ' ' -f 2)
15                 svn ls "$(echo '$url' | sed -e 's/trunk/tags/')"
16         else
17                 error "unknown repo type"
18         fi
19 # This hack is here because git-pull stupidly outputs tag info to stderr.
20 # Shut it up but let real errors through, for use in cron.
21 quietupdate = mr -s -n update 3>&1 1>/dev/null 2>&3 | egrep -v '(storing tag|tag: )' || true
22 # Tests used in the skips below.
23 # - wantsrc checks whether I probably want a full source checkout (quite
24 #   large)
25 # - wantmedia checks whether I probably want various large media files
26 #   here.
27 # - private are hosts I trust private data to
28 # - mylaptop only succeeds if it's on my main development laptop, which 
29 #   gets lots of extra cruft
30 # - kite only succeeds on kite
31 lib =
32         wantsrc() {
33                 test "$(whoami)" = joey
34         }
35         wantmedia() {
36                 if [ "$(whoami)" = joey ]; then
37                         case "$(hostname)" in
38                                 kodama|dragon|dodo)
39                                         return 0
40                         ;;
41                         esac
42                 fi
43                 return 1
44         }
45         private() {
46                 if [ "$(whoami)" = joey ]; then
47                         case "$(hostname)" in
48                         wren|kodama|dragon|dodo|bluebird)
49                                 return 0
50                         ;;
51                         esac
52                 fi
53                 return 1
54         }
55         mylaptop() {
56                 test "$(hostname)" = kodama
57         }
58         kite() {
59                 test "$(hostname)" = wren
60         }
61
62 [src/mr]
63 checkout = git clone ssh://git.kitenet.net/srv/git/kitenet.net/mr
64 skip = ! wantsrc
65
66 [src/linux-2.6]
67 checkout = git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
68 skip = ! mylaptop || ! wantsrc ||
69         ([ "$1" = update ] && [ $(hours_since "$1") -lt 12 ])
70
71 [src/dpkg]
72 # A merge of the upstream dpkg git repo and my own personal branch.
73 checkout =
74         git clone git://git.debian.org/git/dpkg/dpkg.git &&
75         cd dpkg &&
76         git remote add kite ssh://git.kitenet.net/srv/git/kitenet.net/dpkg &&
77         git fetch kite &&
78         git checkout -b sourcev3 kite/sourcev3
79 update = git pull origin master && git pull kite sourcev3
80 commit = git push kite
81 skip = ! wantsrc
82
83 [html/www.debian.org]
84 # Still in CVS..urk!
85 checkout =
86         CVSROOT=:ext:joeyh@cvs.debian.org:/cvs/webwml
87         cvs co -d www.debian.org webwml
88 # cvs sucks sufficiently that I prefer to run these commands by hand,
89 # and only rarely
90 update = echo "skipping cvs update (too slow)"
91 status = echo "skipping cvs status (too ugly)"
92 skip = ! mylaptop || ! wantsrc
93
94 # My home directory, which I keep in svn.
95 []
96 checkout = svn co svn+ssh://svn.kitenet.net/srv/svn/joey/trunk/home-$(hostname) joey
97 # run svnfix after each update
98 update = svn update && svnfix
99
100 [mail]
101 checkout = git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/private/mail
102 skip = ! private
103
104 # Example of how to remember to delete a repo, when one mrconfig file is
105 # used on multiple systems. If you're feeling brave, use rm -rf $MR_REPO
106 # instead. This approach can also be used for renames.
107 [foo]
108 update = error "$MR_REPO is no longer used and should be deleted"
109 skip = ! test -d "$MR_REPO"