Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use curl to download files for OpenBSD and FreeBSD

  • Loading branch information...
commit a22a427d3827d938038316433b92f3f75d4960eb 1 parent f4d3aa8
@avsm avsm authored
View
7 src/repo/curl/misc.ml
@@ -39,9 +39,10 @@ module FileUrl = struct
end
let raw_wget str =
- match Globals.os with
- | Globals.Darwin -> [ "curl"; "-OL"; str ]
- | _ -> [ "wget"; str ]
+ let open Globals in
+ match os with
+ | Darwin | FreeBSD | OpenBSD -> [ "curl"; "-OL"; str ]
+ | _ -> [ "wget"; str ]
let wget remote_file =
raw_wget (Filename.to_string remote_file)
View
8 src/run.ml
@@ -252,7 +252,7 @@ let is_archive file =
let extract file dst =
log "untar %s" file;
- let files = read_command_output [ "tar" ; "tf" ; file ] in
+ let files = read_command_output [ "tar" ; "ztf" ; file ] in
log "%s contains %d files: %s" file (List.length files) (String.concat ", " files);
mkdir tmp_dir;
let err =
@@ -358,8 +358,10 @@ let ocaml_version () =
(* Only used by the compiler switch stuff *)
let download src dst =
- let cmd = match Globals.os with
- | Globals.Darwin -> [ "curl"; "-OL"; src ]
+ let cmd =
+ let open Globals in
+ match os with
+ | Darwin | OpenBSD | FreeBSD -> [ "curl"; "-OL"; src ]
| _ -> [ "wget"; src ] in
mkdir tmp_dir;
let e = in_dir tmp_dir (fun () -> command cmd) in
View
7 src/scripts/opam_mk_repo.ml
@@ -74,9 +74,10 @@ let tmp_dir nv =
Dirname.of_string tmp_dir0 / NV.to_string nv
let wget src =
- match Globals.os with
- | Globals.Darwin -> [ "curl"; "-OL"; src ]
- | _ -> [ "wget"; src ]
+ let open Globals in
+ match os with
+ | Darwin | FreeBSD | OpenBSD -> [ "curl"; "-OL"; src ]
+ | _ -> [ "wget"; src ]
let archive_name src =
let name = F.basename src in
Please sign in to comment.
Something went wrong with that request. Please try again.