diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2018-07-16 00:32:33 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2018-07-16 00:39:38 +0200 |
commit | e54c1dc3ad9bf28df44cd8aaca317c01b3846c70 (patch) | |
tree | 72758aeb3f8a1e2bf752eaf0dadac47e9761ece5 | |
parent | d4a97e36f797d656b11a67abb7a48a443697c1b6 (diff) | |
download | context-mirror-bot-e54c1dc3ad9bf28df44cd8aaca317c01b3846c70.tar.gz |
overwrite existing config
-rw-r--r-- | context_mirror_bot.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/context_mirror_bot.ml b/context_mirror_bot.ml index 284aa41..c02c943 100644 --- a/context_mirror_bot.ml +++ b/context_mirror_bot.ml @@ -62,7 +62,7 @@ exception Prepare_failed of string let bootstrap_repo = "git@bitbucket.org:phg/context-mirror.git" (* our mirror *) let garden_repo = "http://git.contextgarden.net/context/context.git" (* official, but broken *) (*let mirror_repo = "git@bitbucket.org:phg/context-mirror.git" [> our mirror <]*) -let mirror_repos = [ "old", "git@bb-git-mirror:phg/context-mirror.git" (* our old mirror *) +let mirror_repos = [ "old", "git@bb-git-mirror:phg/context-mirror.git" (* our old mirror *) ; "new", "git@gitlab.com:phgsng/context-mirror.git" ] (* our current mirror *) let sources = @@ -329,7 +329,7 @@ end = struct let write_config () = msg ~lev:1 ("Write git configuration to " ^ git_config_file); - let oc = open_out_gen [Open_wronly; Open_creat] 0o600 git_config_file in + let oc = open_out_gen [Open_wronly; Open_creat; Open_trunc] 0o600 git_config_file in output_string oc gitconfig; close_out oc @@ -338,7 +338,7 @@ end = struct | None -> raise Copy_ssh_key_failed | Some _ -> begin - let oc = open_out_gen [Open_wronly; Open_creat] 0o700 ssh_wrapper in + let oc = open_out_gen [Open_wronly; Open_creat; Open_trunc] 0o700 ssh_wrapper in output_string oc ssh_wrapper_script; close_out oc end |