(eval-when-compile): Don't lose if esh-module.el's file name
[emacs.git] / update-subdirs
blob4e0182adf937fc47345643960e8e97c7fc624f6f
1 #!/bin/sh
2 # Write into $1/subdirs.el a list of subdirs of directory $1.
3 cd $1
4 for file in *; do
5 case $file in
6 *.elc | *.el | term | RCS | CVS | Old | . | .. | =* | *~ | *.orig | *.rej)
7 ;;
8 *)
9 if [ -d $file ]; then
10 subdirs="\"$file\" $subdirs"
13 esac
14 done
16 if [ "x$subdirs" = x ]; then
17 rm -f subdirs.el
18 else
19 echo ";; In load-path, after this directory should come
20 ;; certain of its subdirectories. Here we specify them." > subdirs.el
22 echo "(normal-top-level-add-to-load-path '($subdirs))" >> subdirs.el