safe join added not completed
This commit is contained in:
parent
8b12e2f335
commit
170d2b129a
|
@ -51,3 +51,8 @@ already opend buffer died after reading content."
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(defun io/join-path (a b)
|
||||||
|
"safe join a and b addresses."
|
||||||
|
|
||||||
|
)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
(setq unix-project-name (downcase (replace-regexp-in-string " " "_" project-name)))
|
(setq unix-project-name (downcase (replace-regexp-in-string " " "_" project-name)))
|
||||||
;; if specified directory does not exists, shit will make it
|
;; if specified directory does not exists, shit will make it
|
||||||
(setq project-path (read-directory-name "Project Path: " nil nil nil unix-project-name))
|
(setq project-path (read-directory-name "Project Path: " nil nil nil unix-project-name))
|
||||||
(log project-path)
|
|
||||||
(if (not (file-exists-p project-path))
|
(if (not (file-exists-p project-path))
|
||||||
(progn
|
(progn
|
||||||
(mkdir project-path)
|
(mkdir project-path)
|
||||||
|
@ -114,10 +114,11 @@ destenation file address created from template FILE name.
|
||||||
|
|
||||||
(let (curfile destfile)
|
(let (curfile destfile)
|
||||||
(setq curfile (split-string FILE "/"))
|
(setq curfile (split-string FILE "/"))
|
||||||
(nbutlast curfile)
|
(setq curfile (car (last curfile)))
|
||||||
(setq curfile (replace-regexp-in-string "__project__" unix-project-name curfile))
|
(setq curfile (replace-regexp-in-string "__project__" unix-project-name curfile))
|
||||||
(setq curfile (replace-regexp-in-string "\.tmpl" "" curfile))
|
(setq curfile (replace-regexp-in-string "\.tmpl" "" curfile))
|
||||||
(setq destfile (concat project-path curfile))
|
(setq destfile (concat project-path curfile))
|
||||||
|
(log destfile)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue