bootstrap.sh downloads repeatedly every time it is run #1040

Closed
sordina opened this Issue Sep 11, 2012 · 1 comment

Comments

Projects
None yet
3 participants

sordina commented Sep 11, 2012

Whenever I'm debugging a fresh cabal install I add a simple check for the package directory so that I can run it many times without overloading the repositories (and my bandwidth):

diff --git a/cabal-install/bootstrap.sh b/cabal-install/bootstrap.sh
index 5700074..c025c2e 100644
--- a/cabal-install/bootstrap.sh
+++ b/cabal-install/bootstrap.sh
@@ -177,8 +177,11 @@ do_pkg () {
   then
     echo
     echo "Downloading ${PKG}-${VER}..."
-    fetch_pkg ${PKG} ${VER}
-    unpack_pkg ${PKG} ${VER}
+    if [[ ! -d "${PKG}-${VER}" ]]
+    then
+      fetch_pkg ${PKG} ${VER}
+      unpack_pkg ${PKG} ${VER}
+    fi
     cd "${PKG}-${VER}"
     install_pkg ${PKG} ${VER}
     cd ..
Contributor

JakeWheat commented Sep 29, 2014

This feature was added in this commit da05259

23Skidoo closed this Sep 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment