From 9ef423bafb579347f3a90cf333ebe6532497a684 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 30 May 2008 16:23:09 +0200 Subject: bin/bootstrap: Fetch own mercurial if not available --- bin/bootstrap | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'bin/bootstrap') 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 -- cgit v1.2.3