my-emacs-d/recompile-files.sh

23 lines
321 B
Bash
Raw Normal View History

#! /bin/sh
2016-10-04 09:42:34 +00:00
cd `dirname $0`
pwd=`pwd`
for file in `find -iname '*.elc'`
do
2016-10-04 09:42:34 +00:00
elc=`basename "$file"`
el="${elc%c}"
2016-10-11 07:42:34 +00:00
dir=`dirname "$file"`
2016-10-04 09:42:34 +00:00
2016-10-11 07:42:34 +00:00
cd "$dir"
2016-10-04 09:42:34 +00:00
if test "$elc" -ot "$el"
then
2016-10-04 09:42:34 +00:00
echo "Recompiling ${el}"
emacs --batch --eval '(byte-compile-file "'${el}'")'
fi
cd $pwd
done