Skip to content

Commit

Permalink
make install command POSIX compliant (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
fblanqui authored Jul 29, 2022
1 parent b9fae87 commit 1d5ca95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/cli/install.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ let run_install : Config.t -> bool -> string list -> unit =
(* Create directories as needed for [dest]. *)
let cmd =
let dest_dir = Filename.dirname dest in
String.concat " " ["mkdir"; "--parents"; dest_dir]
String.concat " " ["mkdir"; "-p"; dest_dir]
(* Use short options for POSIX compliance. *)
in
run_command dry_run cmd;
(* Copy files. *)
let cmd =
let file = Filename.quote file in
String.concat " "
["cp"; "--preserve"; "--no-target-directory"; "--force"; file; dest]
["cp"; "-p"; "-f"; file; dest]
(* Use short options for POSIX compliance. See
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html. *)
in
run_command dry_run cmd
in
Expand Down

0 comments on commit 1d5ca95

Please sign in to comment.