diff options
author | Vincent Ambo <vincent@spotify.com> | 2013-07-14T21·50+0200 |
---|---|---|
committer | Vincent Ambo <vincent@spotify.com> | 2013-07-14T21·50+0200 |
commit | d23221d2436f0a4558d5ac35e9e272ab950b656e (patch) | |
tree | aba77fdc88c845d9433222f63ec84f4440535a9d /emacs.d | |
parent | 0de09c890d7f124c7814051705e4aec6603b226c (diff) |
emacs: Added a custom-git-clone function
Diffstat (limited to 'emacs.d')
-rw-r--r-- | emacs.d/init-functions.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/emacs.d/init-functions.el b/emacs.d/init-functions.el index 3572cca69b7a..c15b27248ebf 100644 --- a/emacs.d/init-functions.el +++ b/emacs.d/init-functions.el @@ -35,6 +35,15 @@ (load file))) +;; This clones a git repository to 'foldername in .emacs.d +;; if there isn't already a folder with that name +(defun custom-clone-git (url foldername) + "Clones a git repository to .emacs.d/foldername" + (let ((fullpath (concat "~/.emacs.d/" foldername))) + (unless (file-exists-p fullpath) + (shell-command (concat "git clone " url " " fullpath)))) + ) + ;; These come from the emacs starter kit (defun esk-pretty-lambdas () (font-lock-add-keywords |