mirror of
https://github.com/correl/melpa.git
synced 2024-11-14 19:19:32 +00:00
Delete checkout directory if it already exists.
In certain cases we are doing a clone (checkout) and the directory we're cloning to already exists, this makes sure that the we delete it before doing the clone.
This commit is contained in:
parent
a6e79d651b
commit
0c6c84c04b
1 changed files with 6 additions and 0 deletions
|
@ -124,6 +124,8 @@ the same arguments."
|
|||
(print "checkout directory exists, updating...")
|
||||
(pb/run-process dir "darcs" "pull"))
|
||||
(t
|
||||
(when (file-exists-p dir)
|
||||
(delete-directory dir t nil))
|
||||
(print "cloning repository")
|
||||
(pb/run-process nil "darcs" "get" repo dir)))
|
||||
(pb/run-process dir "darcs" "changes" "--last" "1")
|
||||
|
@ -140,6 +142,8 @@ the same arguments."
|
|||
(print "checkout directory exists, updating...")
|
||||
(pb/run-process dir "svn" "up"))
|
||||
(t
|
||||
(when (file-exists-p dir)
|
||||
(delete-directory dir t nil))
|
||||
(print "cloning repository")
|
||||
(pb/run-process nil "svn" "checkout" repo dir)))
|
||||
(pb/run-process dir "svn" "info")
|
||||
|
@ -157,6 +161,8 @@ the same arguments."
|
|||
(print "checkout directory exists, updating...")
|
||||
(pb/run-process dir "git" "pull"))
|
||||
(t
|
||||
(when (file-exists-p dir)
|
||||
(delete-directory dir t nil))
|
||||
(print (format "cloning %s to %s" repo dir))
|
||||
(pb/run-process nil "git" "clone" repo dir)))
|
||||
(when commit
|
||||
|
|
Loading…
Reference in a new issue