]> 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:

Always ensure all parent .mrconfig files are loaded
[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 # Include all available libs.
8 include = cat /usr/share/mr/* 2>/dev/null || true
9 # Teach mr to run a few git and svn specific commands.
10 svn_cleanup = svn cleanup "$@"
11 git_gc = git gc "$@"
12 git_tags = git tag -l
13 svn_tags = svn ls "$(LC_ALL=C svn info . | grep -i ^URL: | cut -d ' ' -f 2 | sed -e 's/trunk/tags/')"
14 # I prefer to git-svn rebase to fetch
15 git_svn_update = git svn rebase
16 # Tests used below.
17 # - anon checks whether this is an anonymous checkout, by testing what url
18 #   $HOME uses
19 # - full checks whether I probably want a full checkout (quite large),
20 #   if not, the checkout is minimal
21 # - on checks whether the given host basename is one of the listed
22 #   values. A value can also have a username in it, ie "joey@dodo".
23 # - mylaptop only succeeds if it's on my main development laptop, which 
24 #   gets lots of extra cruft
25 lib = 
26         hostname="$(hostname)"
27         whoami="$(whoami)"
28         anon() {
29                 ( GIT_CONFIG=$HOME/.git/config git config remote.origin.url || cat .git/remotes/origin ) | grep -q 'git://'
30         }
31         full() {
32                 test "$whoami" = joey && ! anon
33         }
34         on() {
35                 for host in $@; do
36                         if [ "${host%@*}" != "${host#*@}" ]; then
37                                 if [ "$whoami" != "${host%@*}" ]; then
38                                         continue
39                                 fi
40                                 host="${host#*@}"
41                         fi
42                         if [ "$hostname" = "$host" ]; then
43                                 return 0
44                         fi
45                 done
46                 return 1
47         }
48         mylaptop() {
49                 on joey@gnu
50         }
51
52 # The root of my home directory.
53 [.]
54 order = 1
55 checkout =
56         if anon; then
57                 git clone git://git.kitenet.net/joey/home joey
58         else
59                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/home joey
60         fi
61
62 [Maildir]
63 # Dummy target to create Maildir. Doesn't run offlineimap since I have that
64 # cronned on machines where I want it.
65 update = :
66 skip = ! full
67 checkout = mkdir Maildir Maildir/cur Maildir/new Maildir/tmp; chmod 700 Maildir
68 status = :
69
70 [mail]
71 checkout = git clone ssh://joey@git.kitenet.net/srv/git/joey/private/mail
72 # I use mairix to index my mail archive; keep its index up-to-date.
73 fixups = if [ "$(which mairix)" ]; then ionice -c 3 mairix -Q; fi
74 skip = ! mylaptop
75
76 [tmp]
77 # This is a dummy target, all it does is run fixups at the end of
78 # an update.
79 fixups = $HOME/bin/fixups
80 checkout = mkdir -p $HOME/tmp
81 status = :
82 order = 25
83
84 [.etc]
85 order = 2
86 checkout = 
87         if anon; then
88                 git clone git://git.kitenet.net/joey/home-etc .etc
89         else
90                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/home-etc .etc
91         fi
92
93 [.cron]
94 checkout =
95         if anon; then
96                 git clone git://git.kitenet.net/joey/cron .cron
97         else
98                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/cron .cron
99         fi
100
101 [packages/perl]
102 order = 30
103 checkout = svn co svn+ssh://joeyh@svn.debian.org/svn/pkg-perl/trunk perl
104 skip = ! mylaptop || ([ "$1" = update ] && ! hours_since "$1" 12)
105
106 [linux-2.6]
107 order = 20
108 checkout = git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
109 skip = ! mylaptop || ([ "$1" = update ] && ! hours_since "$1" 12)
110 push = error "as if!"
111
112 [/etc]
113 # I use etckeeper to keep /etc in git. But it only works if I'm root, 
114 # and if it's not already in etc, skip it.
115 skip = ! test -d /etc/.git || ! test "$(whoami)" = root
116
117 [dpkg]
118 # A merge of the upstream dpkg git repo and my own personal branch.
119 checkout = 
120         git clone git://git.debian.org/git/dpkg/dpkg.git &&
121         cd dpkg &&
122         git remote add kite ssh://git.kitenet.net/srv/git/kitenet.net/dpkg &&
123         git fetch kite &&
124         git checkout -b sourcev3 kite/sourcev3
125 update = git pull origin master && git pull kite sourcev3
126 commit = git commit -a && git push kite
127 push = git push kite
128 skip = ! mylaptop
129
130 [html/www.debian.org]
131 # Still in CVS..urk!
132 checkout = cvs -d ':ext:joeyh@cvs.debian.org:/cvs/webwml' co -d www.debian.org webwml
133 # cvs sucks sufficiently that I prefer to run these commands by hand,
134 # and only rarely
135 update = echo "skipping cvs update (too slow)"
136 status = echo "skipping cvs status (too ugly)"
137 skip = ! mylaptop || ! full