Permalink
Browse files

[enhance] MongoDB: use curl on Mac OS to download mongoDB binaries

  • Loading branch information...
1 parent fcef231 commit 0c342f9427910a03c85073585f24b19ea512b176 @cedricss cedricss committed Jun 11, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 stdlib/database/mongo/db.opa
@@ -374,6 +374,13 @@ Then use option --db-remote instead of --db-local.
#<Else>
none
#<End>#<End>
+
+ wget(from, to) =
+ #<Ifstatic:IS_MAC 1>
+ "curl {from} > {to}"
+ #<Else>
+ "wget {from} -O {to}"
+ #<End>
default_archive =
arch = "x86_64" // TODO 32 BITS
@@ -442,7 +449,7 @@ Then use option --db-remote instead of --db-local.
) else (
do jlog("MongoDB does not seem to be installed in '{path}'")
do jlog("Please wait while Opa downloading MongoDB from '{default_url}'...")
- _ = System.exec("wget {default_url} -O {tgzpath}", "")
+ _ = System.exec(wget(default_url, tgzpath), "")
do jlog("MongoDB was downloaded ({tgzpath})")
tarcmd = "tar -xvzf {tgzpath} -C {path}"
do jlog("Uncompressing of MongoDB archive... ({tarcmd})")

0 comments on commit 0c342f9

Please sign in to comment.