annotate make-dist @ 111871:d21197a7fc63

Don't depend on POSIX compatible parsing of parameter expansion
author Andreas Schwab <schwab@linux-m68k.org>
date Fri, 10 Dec 2010 23:42:17 +0100
parents ced73eea562f
children 2e087a5593f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 ### make-dist: create an Emacs distribution tar file from current srcdir
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) 1995, 1997, 1998, 2000, 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 ### Commentary:
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
23
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
24 ## This basically creates a duplicate directory structure, and then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
25 ## hard links into it only those files that should be distributed.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
26 ## This means that if you add a file with an odd name, you should make
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
27 ## sure that this script will include it.
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 ### Code:
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
30
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
31 progname="$0"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
32
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
33 ### Exit if a command fails.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
34 #set -e
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
35
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
36 ### Print out each line we read, for debugging's sake.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
37 #set -v
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
38
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
39 LANGUAGE=C
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
40 LC_ALL=C
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
41 LC_MESSAGES=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
42 LANG=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
43 export LANGUAGE LC_ALL LC_MESSAGES LANG
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
44
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
45 ## Don't restrict access to any files.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
46 umask 0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
47
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
48 update=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
49 check=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
50 clean_up=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
51 make_tar=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
52 default_gzip=gzip
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
53 newer=""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
54
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
55 while [ $# -gt 0 ]; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
56 case "$1" in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
57 ## This option tells make-dist to delete the staging directory
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
58 ## when done. It is useless to use this unless you make a tar file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
59 "--clean-up" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
60 clean_up=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
61 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
62 ## This option tells make-dist to make a tar file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
63 "--tar" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
64 make_tar=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
65 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
66 ## This option tells make-dist not to recompile or do analogous things.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
67 "--no-update" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
68 update=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
69 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
70 ## This option says don't check for bad file names, etc.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
71 "--no-check" )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
72 check=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
73 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
74 ## This option tells make-dist to make the distribution normally, then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
75 ## remove all files older than the given timestamp file. This is useful
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
76 ## for creating incremental or patch distributions.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
77 "--newer")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
78 newer="$2"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
79 new_extension=".new"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
80 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
81 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
82 ## This option tells make-dist to use `bzip2' instead of gzip.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
83 "--bzip2")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
84 default_gzip="bzip2"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
85 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
86 ## Same with lzma.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
87 "--lzma")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
88 default_gzip="lzma"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
89 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
90
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
91 "--snapshot")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
92 clean_up=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
93 make_tar=yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
94 update=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
95 check=no
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
96 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
97
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
98 "--help")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
99 echo "Usage: ${progname} [options]"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
100 echo ""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
101 echo " --bzip2 use bzip2 instead of gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
102 echo " --clean-up delete staging directories when done"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
103 echo " --lzma use lzma instead of gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
104 echo " --newer=TIME don't include files older than TIME"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
105 echo " --no-check don't check for bad file names etc."
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
106 echo " --no-update don't recompile or do analogous things"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
107 echo " --snapshot same as --clean-up --no-update --tar --no-check"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
108 echo " --tar make a tar file"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
109 echo ""
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
110 exit 0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
111 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
112
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
113 * )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
114 echo "${progname}: Unrecognized argument: $1" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
115 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
116 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
117 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
118 shift
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
119 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
120
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
121 ### Make sure we're running in the right place.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
122 if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
123 echo "${progname}: Can't find \`src/lisp.h' and \`lisp/subr.el'." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
124 echo "${progname} must be run in the top directory of the Emacs" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
125 echo "distribution tree. cd to that directory and try again." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
126 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
127 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
128
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
129 ### Find where to run Emacs.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
130 ### (Accept only absolute file names.)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
131 if [ $update = yes ];
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
132 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
133 if [ -f src/emacs ];
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
134 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
135 EMACS=`pwd`/src/emacs
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
136 else
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
137 case $EMACS in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
138 /*) ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
139 *)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
140 if [ ! -f "$EMACS" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
141 echo "$0: You must set the EMACS environment variable " \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
142 "to an absolute file name." 2>&1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
143 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
144 fi;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
145 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
146 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
147 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
148
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
149 ### Find out which version of Emacs this is.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
150 version=`sed -n '/char emacs_version/ s/^[^"]*"\([^"]*\)".*$/\1/p' src/emacs.c`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
151 if [ ! "${version}" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
152 echo "${progname}: can't find current Emacs version in \`./src/emacs.c'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
153 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
154 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
155
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
156 echo Version number is $version
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
157
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
158 if [ $update = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
159 if ! grep -q "@set EMACSVER *${version}" doc/emacs/emacsver.texi || \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
160 ! grep -q "tree holds version *${version}" README; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
161 echo "WARNING: README and/or emacsver.texi have the wrong version number"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
162 echo "Consider running M-x set-version from admin/admin.el"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
163 sleep 5
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
164 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
165 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
166
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
167 ### Make sure we don't already have a directory emacs-${version}.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
168
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
169 emacsname="emacs-${version}${new_extension}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
170
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
171 if [ -d ${emacsname} ]
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
172 then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
173 echo Directory "${emacsname}" already exists >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
174 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
175 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
176
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
177 ### Make sure the subdirectory is available.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
178 tempparent="make-dist.tmp.$$"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
179 if [ -d ${tempparent} ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
180 echo "${progname}: staging directory \`${tempparent}' already exists.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
181 Perhaps a previous invocation of \`${progname}' failed to clean up after
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
182 itself. Check that directories whose names are of the form
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
183 \`make-dist.tmp.NNNNN' don't contain any important information, remove
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
184 them, and try again." >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
185 exit 1
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
186 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
187
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
188 if [ $check = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
189 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
190 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
191 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
192 leim/[a-z]*/[a-z]*.el > /tmp/el
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
193
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
194 ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
195 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
196 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
197 leim/[a-z]*/[a-z]*.elc > /tmp/elc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
198
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
199 ## Check for .elc files with no corresponding .el file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
200 sed 's/\.el$/.elc/' /tmp/el > /tmp/elelc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
201
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
202 bogosities="`comm -13 /tmp/elelc /tmp/elc`"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
203 if [ x"${bogosities}" != x"" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
204 echo "The following .elc files have no corresponding .el files:"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
205 echo "${bogosities}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
206 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
207
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
208 ### Check for .el files with no corresponding .elc file.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
209 sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
210 losers="`comm -23 /tmp/el /tmp/elcel`"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
211
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
212 rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
213
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
214 bogosities=
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
215 for file in $losers; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
216 grep -q "no-byte-compile: t" $file && continue
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
217 case $file in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
218 site-init.el | site-load.el | site-start.el | default.el) continue ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
219 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
220
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
221 bogosities="$file $bogosities"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
222
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
223 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
224 if [ x"${bogosities}" != x"" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
225 echo "The following .el files have no corresponding .elc files:"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
226 echo "${bogosities}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
227 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
228 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
229
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
230 if [ $update = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
231
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
232 ## Make sure configure is newer than configure.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
233 if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
234 echo "\`./configure.in' is newer than \`./configure'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
235 echo "Running autoconf" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
236 autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; }
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
237 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
238
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
239 ## Make sure src/stamp-h.in is newer than configure.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
240 if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
241 echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
242 echo "Running autoheader" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
243 autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; }
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
244 rm -f src/stamp-h.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
245 echo timestamp > src/stamp-h.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
246 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
247
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
248 echo "Updating Info files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
249 (cd doc/emacs; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
250 (cd doc/misc; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
251 (cd doc/lispref; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
252 (cd doc/lispintro; make info)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
253
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
254 echo "Updating finder, custom and autoload data"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
255 (cd lisp; make updates EMACS="$EMACS")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
256
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
257 if test -f leim/leim-list.el; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
258 echo "Updating leim-list.el"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
259 (cd leim; make leim-list.el EMACS="$EMACS")
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
260 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
261
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
262 echo "Recompiling Lisp files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
263 $EMACS -batch -f batch-byte-recompile-directory lisp leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
264 fi # $update = yes
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
265
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
266 echo "Creating staging directory: \`${tempparent}'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
267
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
268 mkdir ${tempparent}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
269 tempdir="${tempparent}/${emacsname}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
270
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
271 ### This trap ensures that the staging directory will be cleaned up even
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
272 ### when the script is interrupted in mid-career.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
273 if [ "${clean_up}" = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
274 trap "echo 'Cleaning up the staging directory'; rm -rf ${tempparent}" EXIT
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
275 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
276
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
277 echo "Creating top directory: \`${tempdir}'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
278 mkdir ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
279
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
280 ### We copy in the top-level files before creating the subdirectories in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
281 ### hopes that this will make the top-level files appear first in the
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
282 ### tar file; this means that people can start reading the INSTALL and
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
283 ### README while the rest of the tar file is still unpacking. Whoopee.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
284 echo "Making links to top-level files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
285 ln INSTALL README BUGS move-if-change ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
286 ln ChangeLog Makefile.in configure configure.in ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
287 ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
288 ln mkinstalldirs config.sub config.guess install-sh ${tempdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
289
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
290 echo "Creating subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
291 for subdir in site-lisp \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
292 leim leim/CXTERM-DIC leim/MISC-DIC \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
293 leim/SKK-DIC leim/ja-dic leim/quail \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
294 src src/m src/s src/bitmaps lib-src oldXMenu lwlib \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
295 nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
296 `find etc lisp -type d` \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
297 doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
298 info m4 msdos \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
299 nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
300 nextstep/Cocoa/Emacs.base/Contents \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
301 nextstep/Cocoa/Emacs.base/Contents/Resources \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
302 nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
303 nextstep/Cocoa/Emacs.xcodeproj \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
304 nextstep/GNUstep \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
305 nextstep/GNUstep/Emacs.base \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
306 nextstep/GNUstep/Emacs.base/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
307 do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
308 ## site-lisp for in-place installs (?).
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
309 [ "$subdir" = "site-lisp" ] || [ -d "$subdir" ] || \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
310 echo "WARNING: $subdir not found, making anyway"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
311 echo " ${tempdir}/${subdir}"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
312 mkdir ${tempdir}/${subdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
313 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
314
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
315 echo "Making links to \`lisp' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
316 files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
317 -o -name 'README*' \)`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
318
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
319 ### Don't distribute site-init.el, site-load.el, or default.el.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
320 for file in lisp/Makefile.in lisp/makefile.w32-in $files; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
321 case $file in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
322 */site-init*|*/site-load*|*/default*) continue ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
323 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
324 ln $file $tempdir/$file
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
325 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
326
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
327 echo "Making links to \`leim' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
328 (cd leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
329 ln makefile.w32-in ../${tempdir}/leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
330 ln ChangeLog README ../${tempdir}/leim
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
331 ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
332 ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
333 ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
334 ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
335 ln Makefile.in ../${tempdir}/leim/Makefile.in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
336 ln leim-ext.el ../${tempdir}/leim/leim-ext.el
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
337 ## Lisp files that start with a capital (also 4Corner.el) are
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
338 ## generated from TIT dictionaries so we don't distribute them.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
339 ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
340 rm -f ../${tempdir}/leim/quail/quick-b5.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
341 rm -f ../${tempdir}/leim/quail/quick-cns.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
342 rm -f ../${tempdir}/leim/quail/tsang-b5.*
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
343 rm -f ../${tempdir}/leim/quail/tsang-cns.*)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
344
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
345 echo "Making links to \`src'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
346 ### Don't distribute the configured versions of
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
347 ### config.in, paths.in, buildobj.h, or Makefile.in.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
348 (cd src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
349 echo " (It is ok if ln fails in some cases.)"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
350 ln [a-zA-Z]*.[chm] ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
351 ln [a-zA-Z]*.in ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
352 ln [a-zA-Z]*.mk ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
353 ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
354 ln makefile.w32-in ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
355 ln .gdbinit .dbxinit ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
356 cd ../${tempdir}/src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
357 rm -f config.h epaths.h Makefile buildobj.h)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
358
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
359 echo "Making links to \`src/bitmaps'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
360 (cd src/bitmaps
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
361 ln README *.xbm ../../${tempdir}/src/bitmaps)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
362
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
363 echo "Making links to \`src/m'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
364 (cd src/m
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
365 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/m)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
366
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
367 echo "Making links to \`src/s'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
368 (cd src/s
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
369 ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
370
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
371 echo "Making links to \`lib-src'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
372 (cd lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
373 ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
374 ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
375 ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
376 ln makefile.w32-in ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
377 cd ../${tempdir}/lib-src
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
378 rm -f getopt.h)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
379
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
380 echo "Making links to \`m4'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
381 (cd m4
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
382 ln *.m4 ../${tempdir}/m4)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
383
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
384 ## Exclude README.W32 because it is specific to pre-built binaries(?).
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
385 echo "Making links to \`nt'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
386 (cd nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
387 ln emacs.manifest emacs.rc emacsclient.rc config.nt ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
388 ln emacs-src.tags nmake.defs gmake.defs subdirs.el ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
389 ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
390 ln ChangeLog INSTALL README makefile.w32-in ../${tempdir}/nt)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
391
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
392 echo "Making links to \`nt/inc' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
393 for f in `find nt/inc -type f -name '[a-z]*.h'`; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
394 ln $f $tempdir/$f
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
395 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
396
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
397 echo "Making links to \`nt/icons'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
398 (cd nt/icons
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
399 ln README [a-z]*.ico ../../${tempdir}/nt/icons
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
400 ln [a-z]*.cur ../../${tempdir}/nt/icons)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
401
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
402 echo "Making links to \`msdos'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
403 (cd msdos
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
404 ln ChangeLog INSTALL README emacs.ico emacs.pif ../${tempdir}/msdos
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
405 ln is_exec.c sigaction.c mainmake.v2 sed*.inp ../${tempdir}/msdos)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
406
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
407 echo "Making links to \`nextstep'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
408 (cd nextstep
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
409 ln ChangeLog README INSTALL ../${tempdir}/nextstep)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
410
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
411 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
412 (cd nextstep/Cocoa/Emacs.base/Contents
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
413 ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
414
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
415 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
416 (cd nextstep/Cocoa/Emacs.base/Contents/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
417 ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
418
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
419 echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
420 (cd nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
421 ln InfoPlist.strings ../../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
422
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
423 echo "Making links to \`nextstep/Cocoa/Emacs.xcodeproj'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
424 (cd nextstep/Cocoa/Emacs.xcodeproj
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
425 ln project.pbxproj ../../../${tempdir}/nextstep/Cocoa/Emacs.xcodeproj)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
426
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
427 echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
428 (cd nextstep/GNUstep/Emacs.base/Resources
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
429 ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
430
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
431 echo "Making links to \`oldXMenu'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
432 (cd oldXMenu
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
433 ln *.[ch] *.in ../${tempdir}/oldXMenu
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
434 ln README ChangeLog ../${tempdir}/oldXMenu)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
435
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
436 echo "Making links to \`lwlib'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
437 (cd lwlib
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
438 ln *.[ch] *.in ../${tempdir}/lwlib
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
439 ln README ChangeLog ../${tempdir}/lwlib)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
440
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
441 echo "Making links to \`etc' and its subdirectories"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
442 for f in `find etc -type f`; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
443 case $f in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
444 etc/DOC*) continue ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
445 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
446 ln $f $tempdir/$f
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
447 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
448
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
449 echo "Making links to \`info'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
450 ln `find info -type f -print` ${tempdir}/info
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
451
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
452 echo "Making links to \`doc/emacs'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
453 (cd doc/emacs
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
454 ln *.texi *.in makefile.w32-in ChangeLog* ../../${tempdir}/doc/emacs)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
455
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
456 echo "Making links to \`doc/misc'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
457 (cd doc/misc
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
458 ln *.texi *.tex *.in makefile.w32-in gnus-news.el ChangeLog* ../../${tempdir}/doc/misc)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
459
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
460 echo "Making links to \`doc/lispref'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
461 (cd doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
462 ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
463 ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
464 ln two-volume.make ../../${tempdir}/doc/lispref)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
465
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
466 echo "Making links to \`doc/lispintro'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
467 (cd doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
468 ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
469 ln README ChangeLog* ../../${tempdir}/doc/lispintro
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
470 cd ../../${tempdir}/doc/lispintro)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
471
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
472 echo "Making links to \`doc/man'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
473 (cd doc/man
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
474 ln ChangeLog* *.1 ../../${tempdir}/doc/man
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
475 cd ../../${tempdir}/doc/man)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
476
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
477 ### It would be nice if they could all be symlinks to top-level copy, but
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
478 ### you're not supposed to have any symlinks in distribution tar files.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
479 echo "Making sure copying notices are all copies of \`COPYING'"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
480 for subdir in . etc info leim lib-src lisp lwlib msdos nt src; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
481 rm -f ${tempdir}/${subdir}/COPYING
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
482 cp COPYING ${tempdir}/${subdir}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
483 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
484
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
485 if [ "${newer}" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
486 echo "Removing files older than $newer"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
487 ## We remove .elc files unconditionally, on the theory that anyone picking
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
488 ## up an incremental distribution already has a running Emacs to byte-compile
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
489 ## them with.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
490 find ${tempparent} \( -name '*.elc' -o ! -newer ${newer} \) -exec rm -f {} \;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
491 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
492
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
493 ## Don't distribute backups, autosaves, etc.
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
494 echo "Removing unwanted files"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
495 find ${tempparent} \( -name '*~' -o -name '#*#' -o -name '.*ignore' -o -name '=*' -o -name 'TAGS' \) -exec rm -f {} \;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
496
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
497 if [ "${make_tar}" = yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
498 echo "Looking for $default_gzip"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
499 found=0
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
500 temppath=`echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
501 -e 's/:/ /g'`
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
502 for dir in ${temppath}; do
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
503 [ -x ${dir}/$default_gzip ] || continue
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
504 found=1; break
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
505 done
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
506 if [ "$found" = "0" ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
507 echo "WARNING: \`$default_gzip' not found, will not compress" >&2
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
508 default_gzip=cat
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
509 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
510 case "${default_gzip}" in
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
511 bzip2) gzip_extension=.bz2 ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
512 lzma) gzip_extension=.lzma ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
513 gzip) gzip_extension=.gz ; default_gzip="gzip --best";;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
514 *) gzip_extension= ;;
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
515 esac
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
516 echo "Creating tar file"
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
517 (cd ${tempparent} ; tar cvf - ${emacsname} ) \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
518 | ${default_gzip} \
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
519 > ${emacsname}.tar${gzip_extension}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
520 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
521
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
522 if [ "${clean_up}" != yes ]; then
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
523 (cd ${tempparent}; mv ${emacsname} ..)
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
524 rm -rf ${tempparent}
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
525 fi
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
526
ced73eea562f Restore files that I seem to have mistakenly deleted.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
diff changeset
527 ### make-dist ends here