Skip to content

Instantly share code, notes, and snippets.

@hugoduncan
Created January 4, 2011 19:41
Show Gist options
  • Save hugoduncan/765278 to your computer and use it in GitHub Desktop.
Save hugoduncan/765278 to your computer and use it in GitHub Desktop.
Local git clone resource
(ns "blah"
(:require
[pallet.resource :as resource]
[pallet.execute :as execute])
(resource/deflocal git-clone
"Clone a git repo"
(git-clone*
[request repo]
(execute/local-script ;; in 0.4.0-SNAPSHOT
(git clone ~repo))
request))
@hugoduncan
Copy link
Author

Would need a conditional for running more than once
(if (directory? ~path)
(do (cd ~path) (git pull))
(git clone ~repo ~path))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment