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

releasing version 0.17
[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_push = git push "$@"
13 git_tag = git tag -l
14 svn_tag = svn ls "$(LC_ALL=C svn info . | grep -i ^URL: | cut -d ' ' -f 2 | sed -e 's/trunk/tags/')"
15 # This hack is here because git-pull stupidly outputs tag info to stderr.
16 # Shut it up but let real errors through, for use in cron.
17 quietupdate = mr -s -n update 3>&1 1>/dev/null 2>&3 | egrep -v '(storing tag|tag: )' || true
18 # Tests used below.
19 # - anon checks whether this is an anonymous checkout, by testing what url
20 #   $HOME uses
21 # - full checks whether I probably want a full checkout (quite large),
22 #   if not, the checkout is minimal
23 # - wantmedia checks whether I probably want various large media files
24 #   here.
25 # - private are hosts I trust private data to
26 # - mylaptop only succeeds if it's on my main development laptop, which 
27 #   gets lots of extra cruft
28 # - kite only succeeds on kite
29 lib = 
30         anon() {
31                 expr $(GIT_CONFIG=$HOME/.git/config git config remote.origin.url) : 'git://' >/dev/null
32         }
33         full() {
34                 test "$(whoami)" = joey
35         }
36         wantmedia() {
37                 if [ "$(whoami)" = joey ]; then
38                         case "$(hostname)" in
39                                 kodama|dragon|dodo)
40                                         return 0
41                         ;;
42                         esac
43                 fi
44                 return 1
45         }
46         private() {
47                 if [ "$(whoami)" = joey ]; then
48                         case "$(hostname)" in
49                         wren|kodama|dragon|dodo|bluebird|slug)
50                                 return 0
51                         ;;
52                         esac
53                 fi
54                 return 1
55         }
56         mylaptop() {
57                 test "$(hostname)" = kodama
58         }
59         kite() {
60                 test "$(hostname)" = wren
61         }
62
63 # The root of my home directory.
64 []
65 checkout =
66         if anon; then
67                 git clone git://git.kitenet.net/joey/home joey
68         else
69                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/home joey
70         fi
71
72 # This is a dummy target, all it does is run fixups at the end of
73 # an update.
74 [tmp]
75 update = fixups
76 checkout = fixups
77 status = :
78 order = 25
79
80 [.etc]
81 checkout = 
82         if anon; then
83                 git clone git://git.kitenet.net/joey/home-etc .etc
84         else
85                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/home-etc .etc
86         fi
87
88 [.cron]
89 checkout =
90         if anon; then
91                 git clone git://git.kitenet.net/joey/cron .cron
92         else
93                 git clone ssh://git.kitenet.net/srv/git/kitenet.net/joey/cron .cron
94         fi
95
96 [packages/perl]
97 order = 30
98 checkout = svn co svn+ssh://joeyh@svn.debian.org/svn/pkg-perl/trunk perl
99 skip = ! mylaptop || ([ "$1" = update ] && ! hours_since "$1" 12)
100
101 [linux-2.6]
102 order = 20
103 checkout = git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
104 skip = ! mylaptop || ([ "$1" = update ] && ! hours_since "$1" 12)
105 push = error "as if!"
106
107 [/etc]
108 # I use etckeeper to keep /etc in git. But it only works if I'm root, 
109 # and if it's not already in etc, skip it.
110 skip = ! test -d /etc/.git || ! test "$(whoami)" = root
111
112 [dpkg]
113 # A merge of the upstream dpkg git repo and my own personal branch.
114 checkout = 
115         git clone git://git.debian.org/git/dpkg/dpkg.git &&
116         cd dpkg &&
117         git remote add kite ssh://git.kitenet.net/srv/git/kitenet.net/dpkg &&
118         git fetch kite &&
119         git checkout -b sourcev3 kite/sourcev3
120 update = git pull origin master && git pull kite sourcev3
121 commit = git commit -a && git push kite
122 push = git push kite
123 skip = ! mylaptop
124
125 [html/www.debian.org]
126 # Still in CVS..urk!
127 checkout = cvs -d ':ext:joeyh@cvs.debian.org:/cvs/webwml' co -d www.debian.org webwml
128 # cvs sucks sufficiently that I prefer to run these commands by hand,
129 # and only rarely
130 update = echo "skipping cvs update (too slow)"
131 status = echo "skipping cvs status (too ugly)"
132 skip = ! mylaptop || ! full