Skip to content

Instantly share code, notes, and snippets.

@jone
Created September 24, 2010 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jone/594953 to your computer and use it in GitHub Desktop.
Save jone/594953 to your computer and use it in GitHub Desktop.
(defun find-buildout-root (path)
"Search PATH for a buildout root.
If a buildout root is found return the path, othwise return
nil."
;; find the most top one, not the first one
(let ((dir default-directory)
(previous nil))
(while dir
(let ((dir (find-parent-with-file dir "boostrap.py")))
(if dir
(let ((previous dir)))
(let ((dir nil)))))))
previous)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment