File: update-subdirs

package info (click to toggle)
emacs20 20.2-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 58,820 kB
  • ctags: 41,014
  • sloc: lisp: 344,179; ansic: 155,029; sh: 2,896; makefile: 1,756; yacc: 373; asm: 254; csh: 9; sed: 4
file content (23 lines) | stat: -rwxr-xr-x 544 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# Write into $1/subdirs.el a list of subdirs of directory $1.
cd $1
for file in *; do
    case $file in
	*.elc | *.el | term | RCS | Old | . | .. | =* | *~ | *.orig | *.rej)
	  ;;	
	*)
	    if [ -d $file ]; then
	      subdirs="\"$file\" $subdirs"
	    fi
	  ;;
    esac
done

if [ "x$subdirs" = x ]; then
  rm -f subdirs.el
else
  echo ";; In load-path, after this directory should come
;; certain of its subdirectories.  Here we specify them." > subdirs.el

  echo "(normal-top-level-add-to-load-path '($subdirs))" >> subdirs.el
fi