erc fixes
[dot-emacs] / compile-init-dir.el
1 ;; Copyright (C) 2014 Ian Kelling
2
3 ;; This program is free software: you can redistribute it and/or modify
4 ;; it under the terms of the GNU General Public License as published by
5 ;; the Free Software Foundation, either version 3 of the License, or
6 ;; (at your option) any later version.
7
8 ;; This program is distributed in the hope that it will be useful,
9 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ;; GNU General Public License for more details.
12
13 ;; You should have received a copy of the GNU General Public License
14 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ;; batch mode doesn't do package-initialize, so we need to call it to
17 ;; setup the load-path for dash
18
19 (setq force (getenv "FORCE_RECOMPILE"))
20 (package-initialize)
21 (require 'dash)
22 ;; i was using git versions of gnus & bbdb and they
23 ;; needed to run make instead of just byte compile the dir.
24 ;; I'm not anymore, but leaving this in case I do or there
25 ;; are similar packages.
26 (cd "~/.emacs.d/src")
27 (--map (when (and (not (string= it "gnus"))
28 (not (string= it "bbdb"))
29 (not (string= it "."))
30 (not (string= it ".."))
31 (file-directory-p it))
32 (byte-recompile-directory (expand-file-name it) 0 force))
33 (directory-files "."))
34 (byte-recompile-directory (expand-file-name "~/.emacs.d/elpa") 0 force)
35 (byte-recompile-file (expand-file-name "~/.emacs.d/my-init.el") force)