Rename
[emacs.git] / bin / byte-compile
1 #!/bin/bash
2
3 set -e
4 set -u
5 set -E
6
7 EC=emacsclient
8 INPUT=${1:-"${HOME}/.emacs.d/elisp/local"}
9
10 if [[ -f "${INPUT}" ]]; then
11 rm -f "${INPUT}c"
12 ${EC} --eval "(byte-compile-file \"${INPUT}\")"
13 else
14 cd ${INPUT}
15 find -type f -name "*.elc" -delete
16 for file in $(find -type f -name "*.el"); do
17 echo -n "${file} ... "
18 ${EC} --eval "(byte-compile-file \"${file}\")"
19 done
20 fi