On Tue, Jul 8, 2014 at 1:42 PM, Jonas Smedegaard <d...@jones.dk> wrote: > Quoting Felipe Sateler (2014-07-08 18:51:33) >> I've discovered myrepos, which is a very useful tool for managing >> multiple repositories. I currently store all the team repositories >> inside a single pkg-multimedia folder, so I thought using mr should be >> easy. So I came up with the following shell line that works for me, >> and I thought I'd share. >> >> ssh alioth.debian.org "cd /git/pkg-multimedia/ && \ >> find . -name '*.git' -type d" | \ >> sed -e 's|^\./||' -e 's/\.git$//' | \ >> while read package; >> do >> echo "[$package]" >> echo "checkout = gbp clone >> git+ssh://git.debian.org/git/pkg-multimedia/${package}.git" >> echo "update = gbp pull" >> echo "skip = lazy" >> echo >> done > .mrconfig > > Here's an (arguably) safer and easier to read alternative: > > ssh git.debian.org \ > "find /git/pkg-multimedia/ -maxdepth 1 -name '*.git' -type d" \
Yes, maxdepth is a good idea, probably. > | perl -nE 'm{([^/]+).git$} and say $1' \ I'm not sure this part is more readable, but YMMV ;) > | while read package; do > cat >> .mrconfig <<EOF > [$package] > checkout = gbp clone > git+ssh://git.debian.org/git/pkg-multimedia/${package}.git > update = gbp pull > skip = lazy > > EOF > done > > > Beware, though, that my script isn't idempotent. Indeed, although that can be fixed by prepending a "rm -f .mrconfig" in the script where you are storing this snippet. > > Other than that, nice explanation! Thanks! I hope it is useful -- Saludos, Felipe Sateler _______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers