diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-30 16:23:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-30 16:23:09 +0200 |
commit | 9ef423bafb579347f3a90cf333ebe6532497a684 (patch) | |
tree | 9e356cf2413e458cc2a2e642f577fc848d02755e /bin/bootstrap | |
parent | 227a66f617ac70625eb813a7281a6c2307d3c470 (diff) |
bin/bootstrap: Fetch own mercurial if not available
Diffstat (limited to 'bin/bootstrap')
-rwxr-xr-x | bin/bootstrap | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bin/bootstrap b/bin/bootstrap index 09f6e63..97bf94b 100755 --- a/bin/bootstrap +++ b/bin/bootstrap @@ -2,11 +2,7 @@ # bootstrap - populate a home with the most necessary scripts # After running this, other packages can be installed using 'pkg' -# Without mercurial, this is pretty pointless -if ( ! which hg &> /dev/null) { - echo Mercurial not found! - exit 100 -} +HG=hg # Make basic dirctories mkdir -p ~/bin @@ -14,11 +10,20 @@ mkdir -p ~/lib mkdir -p ~/packages mkdir -p ~/var/tmp/incoming +if ( ! which hg &> /dev/null) { + echo 'Mercurial not found, fetching...' + cd ~/packages + ssh derf.homelinux.org 'tar cz -C ~/var/packages_root mercurial-bin' | tar xz + HG="$HOME/packages/mercurial-bin/mercurial-1.0.1/hg" +} + # Fetch the core package, containing checklinks and pkg cd ~/packages echo "fetching core" -hg clone ssh://derf.homelinux.org/var/packages_root/core +$HG clone ssh://derf.homelinux.org/var/packages_root/core # Create symlinks for pkg and checklinks cd core bin/checklinks +cd ~/packages/mercurial-bin +~/bin/checklinks |