From 9bfbbd79d804a27a76275c5f765a197fefd102e7 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 3 Oct 2016 17:34:11 +0200 Subject: [PATCH] Create a script to recompile out-of-date files When I update packages on a different machine, `.elc` files become obsolete. This script brings them up to date. --- recompile-files.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 recompile-files.sh diff --git a/recompile-files.sh b/recompile-files.sh new file mode 100755 index 0000000..4c306de --- /dev/null +++ b/recompile-files.sh @@ -0,0 +1,16 @@ +#! /bin/sh + +pwd=`pwd` + +for file in `find -iname '*.elc'` +do + cd `dirname "$file"` + + if test $file -ot ${file%c} + then + echo "Recompiling ${file%c}" + emacs --batch --eval '(byte-compile-file "'${file%c}'")' + fi + + cd $pwd +done