cleanup added

This commit is contained in:
lxsameer 2011-05-26 15:37:30 +04:30
parent c96571d68a
commit e316a1450b
1 changed files with 18 additions and 0 deletions

View File

@ -175,6 +175,24 @@ binding for Kuso IDE django plugin"
(interactive "sEnter command: ")
(manage-command "*Custom*" "custom" command)
)
(defun django/cleanup ()
"Remove all the unneecessary files form project."
(interactive)
(let (buffer commands)
(if (string= project-path "")
(get-project-path)
)
(setq commands "rm -fv `find @@pp@@ -iname \"*.pyc\"` && rm -fv `find @@pp@@ -iname \"*~\"` && rm -fv `find @@pp@@ -iname \"\.#*\"` && rm -vf `find @@pp@@ -iname \"#*\"`")
(setq commands (replace-regexp-in-string "@@pp@@" project-path commands))
(setq buffer (get-buffer-create "*Cleanup*"))
(switch-to-buffer buffer)
(start-process-shell-command "Cleanup" buffer commands)
)
)
;; ----------------------------------------------------------------------
;; Minor Modes
;; ----------------------------------------------------------------------