Mercurial > emacs
annotate update-subdirs @ 112308:474d5026a5a2
Regenerate.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 08 Jan 2011 22:57:07 -0800 |
parents | ced73eea562f |
children | 417b1e4d63cd |
rev | line source |
---|---|
111811
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
1 #!/bin/sh |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
2 # Write into $1/subdirs.el a list of subdirs of directory $1. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
3 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
4 # Copyright (C) 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005, |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
5 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
6 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
7 # This file is part of GNU Emacs. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
8 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
9 # GNU Emacs is free software: you can redistribute it and/or modify |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
10 # it under the terms of the GNU General Public License as published by |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
11 # the Free Software Foundation, either version 3 of the License, or |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
12 # (at your option) any later version. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
13 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
14 # GNU Emacs is distributed in the hope that it will be useful, |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
17 # GNU General Public License for more details. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
18 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
19 # You should have received a copy of the GNU General Public License |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
20 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
21 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
22 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
23 cd $1 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
24 for file in *; do |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
25 case $file in |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
26 *.elc | *.el | term | RCS | CVS | Old | . | .. | =* | *~ | *.orig | *.rej) |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
27 ;; |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
28 *) |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
29 if [ -d $file ]; then |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
30 if [ "$file" = "obsolete" ]; then |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
31 subdirs="$subdirs \"$file\"" |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
32 else |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
33 subdirs="\"$file\" $subdirs" |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
34 fi |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
35 fi |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
36 ;; |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
37 esac |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
38 done |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
39 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
40 if [ "x$subdirs" = x ]; then |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
41 rm -f subdirs.el |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
42 else |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
43 rm -f subdirs.el~ |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
44 echo ";; -*- no-byte-compile: t -*- |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
45 ;; In load-path, after this directory should come |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
46 ;; certain of its subdirectories. Here we specify them. |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
47 (normal-top-level-add-to-load-path '($subdirs)) |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
48 ;; Local" "Variables: |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
49 ;; version-control: never |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
50 ;; no-byte-compile: t |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
51 ;; End:" > subdirs.el~ |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
52 if cmp "subdirs.el" "subdirs.el~" >/dev/null 2>&1; then |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
53 :; # echo "subdirs.el unchanged"; |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
54 else |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
55 mv subdirs.el~ subdirs.el |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
56 fi |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
57 fi |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
58 |
ced73eea562f
Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff
changeset
|
59 # arch-tag: 56ebcf1b-5c30-4934-b0b4-72d374064704 |