From 6f1a4b796d323e29620872b687a999cb3d0ea91c Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 4 Oct 2016 11:42:34 +0200 Subject: [PATCH] Fix .elc recompile script --- recompile-files.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recompile-files.sh b/recompile-files.sh index 4c306de..9f08e19 100755 --- a/recompile-files.sh +++ b/recompile-files.sh @@ -1,15 +1,20 @@ #! /bin/sh +cd `dirname $0` pwd=`pwd` for file in `find -iname '*.elc'` do + elc=`basename "$file"` + el="${elc%c}" + cd `dirname "$file"` - if test $file -ot ${file%c} + if test "$elc" -ot "$el" then - echo "Recompiling ${file%c}" - emacs --batch --eval '(byte-compile-file "'${file%c}'")' + echo "Recompiling ${el}" + + emacs --batch --eval '(byte-compile-file "'${el}'")' fi cd $pwd