-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathego-resource.el
49 lines (36 loc) · 1.66 KB
/
ego-resource.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; ego-resource.el --- Functions dealing with ego theme resources
;; Copyright (C) 2015 Feng Shu, Kuangdash
;; 2012, 2013, 2014, 2015 Kelvin Hu
;; Author: Kelvin Hu <ini DOT kelvin AT gmail DOT com>
;; Feng Shu <tumashu AT 163.com>
;; Kuangdash <kuangdash AT 163.com>
;; Keywords: org-mode, convenience, beautify
;; Homepage: https://github.com/emacs-china/EGO
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; This file include functions which deal with ego theme resources
;;; Code:
(require 'format-spec)
(require 'ox)
(require 'ht)
(require 'ego-util)
(require 'ego-config)
(defun ego--prepare-theme-resources (pub-root-dir)
"Copy theme resources files to PUB-ROOT-DIR."
(let ((pub-theme-dir (expand-file-name "media/" pub-root-dir))
(theme-dirs (reverse (ego--get-theme-dirs nil nil 'resources))))
(when (file-directory-p pub-theme-dir)
(delete-directory pub-theme-dir t))
(dolist (theme-dir theme-dirs)
(copy-directory theme-dir pub-theme-dir t t t))))
(provide 'ego-resource)
;;; ego-resource.el ends here