#!/bin/bash # Populate a few source control directories. If they exist, they'll be used # instead of source tarballs. (Note: if you want to apply patches you'll have # to do it yourself, sources/patches only applies to tarballs.) mkdir -p packages && if test ! -d packages/busybox { git clone git://busybox.net/busybox packages/busybox || exit 1 } else { shell {cd packages/busybox && git pull} || exit 1 } if test ! -d packages/uClibc { git clone git://uclibc.org/uClibc packages/uClibc } else { shell {cd packages/uClibc && git pull} || exit 1 } if test ! -d packages/linux { git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 \ packages/linux || exit 1 } else { shell {cd packages/linux && git pull} || exit 1 } if test ! -d packages/toybox { hg clone http://landley.net/hg/toybox packages/toybox || exit 1 } else { shell {cd packages/toybox && hg pull -u} || exit 1 }