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.
This commit is contained in:
		
							
								
								
									
										16
									
								
								recompile-files.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										16
									
								
								recompile-files.sh
									
									
									
									
									
										Executable file
									
								
							@@ -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
 | 
			
		||||
		Reference in New Issue
	
	Block a user