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

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:

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