Mercurial > hg > xemacs-beta
comparison install-sh @ 5731:ec3712ffd0e6
Update config.guess, config.sub, and install-sh to their latest versions.
This is primarily to gain preliminary support for the new aarch64
architecture. See xemacs-patches message
<CAHCOHQmsxN7ZDaUs=onRPrzbj9S6BnMHHwwEg8HUfXyEVwySGw@mail.gmail.com>.
author | Jerry James <james@xemacs.org> |
---|---|
date | Fri, 15 Mar 2013 13:52:53 -0600 |
parents | 6ed8c4ccc17e |
children |
comparison
equal
deleted
inserted
replaced
5730:4521c9dc64f6 | 5731:ec3712ffd0e6 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # install - install a program, script, or datafile | 2 # install - install a program, script, or datafile |
3 | 3 |
4 scriptversion=2006-12-25.00 | 4 scriptversion=2011-11-20.07; # UTC |
5 | 5 |
6 # This originates from X11R5 (mit/util/scripts/install.sh), which was | 6 # This originates from X11R5 (mit/util/scripts/install.sh), which was |
7 # later released in X11R6 (xc/config/util/install.sh) with the | 7 # later released in X11R6 (xc/config/util/install.sh) with the |
8 # following copyright and license. | 8 # following copyright and license. |
9 # | 9 # |
33 # | 33 # |
34 # | 34 # |
35 # FSF changes to this file are in the public domain. | 35 # FSF changes to this file are in the public domain. |
36 # | 36 # |
37 # Calling this script install-sh is preferred over install.sh, to prevent | 37 # Calling this script install-sh is preferred over install.sh, to prevent |
38 # `make' implicit rules from creating a file called install from it | 38 # 'make' implicit rules from creating a file called install from it |
39 # when there is no Makefile. | 39 # when there is no Makefile. |
40 # | 40 # |
41 # This script is compatible with the BSD install script, but was written | 41 # This script is compatible with the BSD install script, but was written |
42 # from scratch. | 42 # from scratch. |
43 | 43 |
154 shift;; | 154 shift;; |
155 | 155 |
156 -s) stripcmd=$stripprog;; | 156 -s) stripcmd=$stripprog;; |
157 | 157 |
158 -t) dst_arg=$2 | 158 -t) dst_arg=$2 |
159 # Protect names problematic for 'test' and other utilities. | |
160 case $dst_arg in | |
161 -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
162 esac | |
159 shift;; | 163 shift;; |
160 | 164 |
161 -T) no_target_directory=true;; | 165 -T) no_target_directory=true;; |
162 | 166 |
163 --version) echo "$0 $scriptversion"; exit $?;; | 167 --version) echo "$0 $scriptversion"; exit $?;; |
184 set fnord "$@" "$dst_arg" | 188 set fnord "$@" "$dst_arg" |
185 shift # fnord | 189 shift # fnord |
186 fi | 190 fi |
187 shift # arg | 191 shift # arg |
188 dst_arg=$arg | 192 dst_arg=$arg |
193 # Protect names problematic for 'test' and other utilities. | |
194 case $dst_arg in | |
195 -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
196 esac | |
189 done | 197 done |
190 fi | 198 fi |
191 | 199 |
192 if test $# -eq 0; then | 200 if test $# -eq 0; then |
193 if test -z "$dir_arg"; then | 201 if test -z "$dir_arg"; then |
194 echo "$0: no input file specified." >&2 | 202 echo "$0: no input file specified." >&2 |
195 exit 1 | 203 exit 1 |
196 fi | 204 fi |
197 # It's OK to call `install-sh -d' without argument. | 205 # It's OK to call 'install-sh -d' without argument. |
198 # This can happen when creating conditional directories. | 206 # This can happen when creating conditional directories. |
199 exit 0 | 207 exit 0 |
200 fi | 208 fi |
201 | 209 |
202 if test -z "$dir_arg"; then | 210 if test -z "$dir_arg"; then |
203 trap '(exit $?); exit' 1 2 13 15 | 211 do_exit='(exit $ret); exit $ret' |
212 trap "ret=129; $do_exit" 1 | |
213 trap "ret=130; $do_exit" 2 | |
214 trap "ret=141; $do_exit" 13 | |
215 trap "ret=143; $do_exit" 15 | |
204 | 216 |
205 # Set umask so as not to create temps with too-generous modes. | 217 # Set umask so as not to create temps with too-generous modes. |
206 # However, 'strip' requires both read and write access to temps. | 218 # However, 'strip' requires both read and write access to temps. |
207 case $mode in | 219 case $mode in |
208 # Optimize common cases. | 220 # Optimize common cases. |
226 esac | 238 esac |
227 fi | 239 fi |
228 | 240 |
229 for src | 241 for src |
230 do | 242 do |
231 # Protect names starting with `-'. | 243 # Protect names problematic for 'test' and other utilities. |
232 case $src in | 244 case $src in |
233 -*) src=./$src;; | 245 -* | [=\(\)!]) src=./$src;; |
234 esac | 246 esac |
235 | 247 |
236 if test -n "$dir_arg"; then | 248 if test -n "$dir_arg"; then |
237 dst=$src | 249 dst=$src |
238 dstdir=$dst | 250 dstdir=$dst |
250 | 262 |
251 if test -z "$dst_arg"; then | 263 if test -z "$dst_arg"; then |
252 echo "$0: no destination specified." >&2 | 264 echo "$0: no destination specified." >&2 |
253 exit 1 | 265 exit 1 |
254 fi | 266 fi |
255 | |
256 dst=$dst_arg | 267 dst=$dst_arg |
257 # Protect names starting with `-'. | |
258 case $dst in | |
259 -*) dst=./$dst;; | |
260 esac | |
261 | 268 |
262 # If destination is a directory, append the input filename; won't work | 269 # If destination is a directory, append the input filename; won't work |
263 # if double slashes aren't ignored. | 270 # if double slashes aren't ignored. |
264 if test -d "$dst"; then | 271 if test -d "$dst"; then |
265 if test -n "$no_target_directory"; then | 272 if test -n "$no_target_directory"; then |
345 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | 352 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 |
346 then | 353 then |
347 if test -z "$dir_arg" || { | 354 if test -z "$dir_arg" || { |
348 # Check for POSIX incompatibilities with -m. | 355 # Check for POSIX incompatibilities with -m. |
349 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | 356 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or |
350 # other-writeable bit of parent directory when it shouldn't. | 357 # other-writable bit of parent directory when it shouldn't. |
351 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | 358 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. |
352 ls_ld_tmpdir=`ls -ld "$tmpdir"` | 359 ls_ld_tmpdir=`ls -ld "$tmpdir"` |
353 case $ls_ld_tmpdir in | 360 case $ls_ld_tmpdir in |
354 d????-?r-*) different_mode=700;; | 361 d????-?r-*) different_mode=700;; |
355 d????-?--*) different_mode=755;; | 362 d????-?--*) different_mode=755;; |
383 # or it failed possibly due to a race condition. Create the | 390 # or it failed possibly due to a race condition. Create the |
384 # directory the slow way, step by step, checking for races as we go. | 391 # directory the slow way, step by step, checking for races as we go. |
385 | 392 |
386 case $dstdir in | 393 case $dstdir in |
387 /*) prefix='/';; | 394 /*) prefix='/';; |
388 -*) prefix='./';; | 395 [-=\(\)!]*) prefix='./';; |
389 *) prefix='';; | 396 *) prefix='';; |
390 esac | 397 esac |
391 | 398 |
392 eval "$initialize_posix_glob" | 399 eval "$initialize_posix_glob" |
393 | 400 |
401 | 408 |
402 prefixes= | 409 prefixes= |
403 | 410 |
404 for d | 411 for d |
405 do | 412 do |
406 test -z "$d" && continue | 413 test X"$d" = X && continue |
407 | 414 |
408 prefix=$prefix$d | 415 prefix=$prefix$d |
409 if test -d "$prefix"; then | 416 if test -d "$prefix"; then |
410 prefixes= | 417 prefixes= |
411 else | 418 else |
513 | 520 |
514 # Local variables: | 521 # Local variables: |
515 # eval: (add-hook 'write-file-hooks 'time-stamp) | 522 # eval: (add-hook 'write-file-hooks 'time-stamp) |
516 # time-stamp-start: "scriptversion=" | 523 # time-stamp-start: "scriptversion=" |
517 # time-stamp-format: "%:y-%02m-%02d.%02H" | 524 # time-stamp-format: "%:y-%02m-%02d.%02H" |
518 # time-stamp-end: "$" | 525 # time-stamp-time-zone: "UTC" |
526 # time-stamp-end: "; # UTC" | |
519 # End: | 527 # End: |