Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove pre-existing git repo with the same name if it exists

  • Loading branch information...
commit a72fec10127e9d3b210efad16e825ec6d2a0e928 1 parent a5947d2
@samoht samoht authored
Showing with 3 additions and 2 deletions.
  1. +1 −0  Makefile
  2. BIN  boot/ocp-get.boot
  3. +2 −2 src/run.ml
View
1  Makefile
@@ -26,6 +26,7 @@ opt: ./_obuild/unixrun
ocamlc -o ./_obuild/unixrun -make-runtime unix.cma str.cma
bootstrap: _obuild/unixrun _obuild/ocp-get/ocp-get.byte
+ rm -f boot/ocp-get.boot
ocp-bytehack -static _obuild/ocp-get/ocp-get.byte -o boot/ocp-get.boot
link: ocp-get ocp-get-server
View
BIN  boot/ocp-get.boot
Binary file not shown
View
4 src/run.ml
@@ -294,8 +294,8 @@ let clone repo last_pwd nv =
let b_name = Filename.chop_extension (Filename.basename repo) in
let dst_git = Filename.concat tmp_dir b_name in
log "cloning %s into %s" repo dst_git;
- if Sys.file_exists repo then
- safe_rm repo;
+ if Sys.file_exists dst_git then
+ safe_rm dst_git;
let err = Git.clone repo b_name in
if err = 0 then
let s_from = Printf.sprintf "%s/%s" (Unix.getcwd ()) b_name in
Please sign in to comment.
Something went wrong with that request. Please try again.