Mercurial > cpython-lru_cache-weakref
annotate install-sh @ 79675:c0a2294de787 2.7
Issue #16199: Backport 2to3 typo fix from 3.2.
| author | Chris Jerdonek <chris.jerdonek@gmail.com> |
|---|---|
| date | Thu, 11 Oct 2012 16:15:46 -0700 |
| parents | 1f334198e6d7 |
| children |
| rev | line source |
|---|---|
| 3604 | 1 #!/bin/sh |
| 2 # | |
| 3 # install - install a program, script, or datafile | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
4 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
6 # later released in X11R6 (xc/config/util/install.sh) with the |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
7 # following copyright and license. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
8 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
9 # Copyright (C) 1994 X Consortium |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
10 # |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
11 # Permission is hereby granted, free of charge, to any person obtaining a copy |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
12 # of this software and associated documentation files (the "Software"), to |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
13 # deal in the Software without restriction, including without limitation the |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
15 # sell copies of the Software, and to permit persons to whom the Software is |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
16 # furnished to do so, subject to the following conditions: |
| 3604 | 17 # |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
18 # The above copyright notice and this permission notice shall be included in |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
19 # all copies or substantial portions of the Software. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
20 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
27 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
28 # Except as contained in this notice, the name of the X Consortium shall not |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
29 # be used in advertising or otherwise to promote the sale, use or other deal- |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
30 # ings in this Software without prior written authorization from the X Consor- |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
31 # tium. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
32 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
33 # |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
34 # FSF changes to this file are in the public domain. |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
35 # |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
36 # Calling this script install-sh is preferred over install.sh, to prevent |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
37 # `make' implicit rules from creating a file called install from it |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
38 # when there is no Makefile. |
| 3604 | 39 # |
| 40 # This script is compatible with the BSD install script, but was written | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
41 # from scratch. It can only install one file at a time, a restriction |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
42 # shared with many OS's install programs. |
| 3604 | 43 |
| 44 | |
| 45 # set DOITPROG to echo to test this script | |
| 46 | |
| 47 # Don't use :- since 4.3BSD and earlier shells don't like it. | |
| 48 doit="${DOITPROG-}" | |
| 49 | |
| 50 | |
| 51 # put in absolute paths if you don't have them in your path; or use env. vars. | |
| 52 | |
| 53 mvprog="${MVPROG-mv}" | |
| 54 cpprog="${CPPROG-cp}" | |
| 55 chmodprog="${CHMODPROG-chmod}" | |
| 56 chownprog="${CHOWNPROG-chown}" | |
| 57 chgrpprog="${CHGRPPROG-chgrp}" | |
| 58 stripprog="${STRIPPROG-strip}" | |
| 59 rmprog="${RMPROG-rm}" | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
60 mkdirprog="${MKDIRPROG-mkdir}" |
| 3604 | 61 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
62 transformbasename="" |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
63 transform_arg="" |
| 3604 | 64 instcmd="$mvprog" |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
65 chmodcmd="$chmodprog 0755" |
| 3604 | 66 chowncmd="" |
| 67 chgrpcmd="" | |
| 68 stripcmd="" | |
| 69 rmcmd="$rmprog -f" | |
| 70 mvcmd="$mvprog" | |
| 71 src="" | |
| 72 dst="" | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
73 dir_arg="" |
| 3604 | 74 |
| 75 while [ x"$1" != x ]; do | |
| 76 case $1 in | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
77 -c) instcmd=$cpprog |
| 3604 | 78 shift |
| 79 continue;; | |
| 80 | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
81 -d) dir_arg=true |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
82 shift |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
83 continue;; |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
84 |
| 3604 | 85 -m) chmodcmd="$chmodprog $2" |
| 86 shift | |
| 87 shift | |
| 88 continue;; | |
| 89 | |
| 90 -o) chowncmd="$chownprog $2" | |
| 91 shift | |
| 92 shift | |
| 93 continue;; | |
| 94 | |
| 95 -g) chgrpcmd="$chgrpprog $2" | |
| 96 shift | |
| 97 shift | |
| 98 continue;; | |
| 99 | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
100 -s) stripcmd=$stripprog |
| 3604 | 101 shift |
| 102 continue;; | |
| 103 | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
104 -t=*) transformarg=`echo $1 | sed 's/-t=//'` |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
105 shift |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
106 continue;; |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
107 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
108 -b=*) transformbasename=`echo $1 | sed 's/-b=//'` |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
109 shift |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
110 continue;; |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
111 |
| 3604 | 112 *) if [ x"$src" = x ] |
| 113 then | |
| 114 src=$1 | |
| 115 else | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
116 # this colon is to work around a 386BSD /bin/sh bug |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
117 : |
| 3604 | 118 dst=$1 |
| 119 fi | |
| 120 shift | |
| 121 continue;; | |
| 122 esac | |
| 123 done | |
| 124 | |
| 125 if [ x"$src" = x ] | |
| 126 then | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
127 echo "$0: no input file specified" >&2 |
| 3604 | 128 exit 1 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
129 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
130 : |
| 3604 | 131 fi |
| 132 | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
133 if [ x"$dir_arg" != x ]; then |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
134 dst=$src |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
135 src="" |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
136 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
137 if [ -d "$dst" ]; then |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
138 instcmd=: |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
139 chmodcmd="" |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
140 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
141 instcmd=$mkdirprog |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
142 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
143 else |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
144 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
145 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
146 # might cause directories to be created, which would be especially bad |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
147 # if $src (and thus $dsttmp) contains '*'. |
| 3604 | 148 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
149 if [ -f "$src" ] || [ -d "$src" ] |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
150 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
151 : |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
152 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
153 echo "$0: $src does not exist" >&2 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
154 exit 1 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
155 fi |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
156 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
157 if [ x"$dst" = x ] |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
158 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
159 echo "$0: no destination specified" >&2 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
160 exit 1 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
161 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
162 : |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
163 fi |
| 3604 | 164 |
| 165 # If destination is a directory, append the input filename; if your system | |
| 166 # does not like double slashes in filenames, you may need to add some logic | |
| 167 | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
168 if [ -d "$dst" ] |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
169 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
170 dst=$dst/`basename "$src"` |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
171 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
172 : |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
173 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
174 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
175 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
176 ## this sed command emulates the dirname command |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
177 dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
178 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
179 # Make sure that the destination directory exists. |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
180 # this part is taken from Noah Friedman's mkinstalldirs script |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
181 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
182 # Skip lots of stat calls in the usual case. |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
183 if [ ! -d "$dstdir" ]; then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
184 defaultIFS=' |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
185 ' |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
186 IFS="${IFS-$defaultIFS}" |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
187 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
188 oIFS=$IFS |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
189 # Some sh's can't handle IFS=/ for some reason. |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
190 IFS='%' |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
191 set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
192 IFS=$oIFS |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
193 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
194 pathcomp='' |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
195 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
196 while [ $# -ne 0 ] ; do |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
197 pathcomp=$pathcomp$1 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
198 shift |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
199 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
200 if [ ! -d "$pathcomp" ] ; |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
201 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
202 $mkdirprog "$pathcomp" |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
203 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
204 : |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
205 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
206 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
207 pathcomp=$pathcomp/ |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
208 done |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
209 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
210 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
211 if [ x"$dir_arg" != x ] |
| 3604 | 212 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
213 $doit $instcmd "$dst" && |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
214 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
215 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
216 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
217 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
218 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
219 else |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
220 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
221 # If we're going to rename the final executable, determine the name now. |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
222 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
223 if [ x"$transformarg" = x ] |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
224 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
225 dstfile=`basename "$dst"` |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
226 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
227 dstfile=`basename "$dst" $transformbasename | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
228 sed $transformarg`$transformbasename |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
229 fi |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
230 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
231 # don't allow the sed command to completely eliminate the filename |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
232 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
233 if [ x"$dstfile" = x ] |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
234 then |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
235 dstfile=`basename "$dst"` |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
236 else |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
237 : |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
238 fi |
| 3604 | 239 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
240 # Make a couple of temp file names in the proper directory. |
| 3604 | 241 |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
242 dsttmp=$dstdir/#inst.$$# |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
243 rmtmp=$dstdir/#rm.$$# |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
244 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
245 # Trap to clean up temp files at exit. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
246 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
247 trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
248 trap '(exit $?); exit' 1 2 13 15 |
| 3604 | 249 |
| 250 # Move or copy the file name to the temp name | |
| 251 | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
252 $doit $instcmd "$src" "$dsttmp" && |
| 3604 | 253 |
| 254 # and set any options; do chmod last to preserve setuid bits | |
| 255 | |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
256 # If any of these fail, we abort the whole thing. If we want to |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
257 # ignore errors from any of these, just make sure not to ignore |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
258 # errors from the above "$doit $instcmd $src $dsttmp" command. |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
259 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
260 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
261 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
262 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
263 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
264 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
265 # Now remove or move aside any old file at destination location. We try this |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
266 # two ways since rm can't unlink itself on some systems and the destination |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
267 # file might be busy for other reasons. In this case, the final cleanup |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
268 # might fail but the new file should still install successfully. |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
269 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
270 { |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
271 if [ -f "$dstdir/$dstfile" ] |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
272 then |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
273 $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
274 $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
275 { |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
276 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
277 (exit 1); exit |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
278 } |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
279 else |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
280 : |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
281 fi |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
282 } && |
| 3604 | 283 |
| 284 # Now rename the file to the real destination. | |
| 285 | |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
286 $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" |
|
16553
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
287 |
|
9a95794e0f7e
Update install-sh using version from automake 1.4. Closes patch #103657
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents:
8991
diff
changeset
|
288 fi && |
| 3604 | 289 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
290 # The final little trick to "correctly" pass the exit status to the exit trap. |
| 3604 | 291 |
|
29456
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
292 { |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
293 (exit 0); exit |
|
1f334198e6d7
Patch #746366: Update to current automake install-sh. Will backport to 2.2.
Martin v. Löwis <martin@v.loewis.de>
parents:
16553
diff
changeset
|
294 } |
