Mercurial > hg > early-roguelike
comparison install-sh @ 253:d9badb9c0179
Update the fallback install script.
| author | John "Elwin" Edwards |
|---|---|
| date | Tue, 31 Jan 2017 18:59:38 -0500 |
| parents | 78ca6502d2a6 |
| children | 029c1f5c5588 |
comparison
equal
deleted
inserted
replaced
| 252:3d4252fa2ed3 | 253:d9badb9c0179 |
|---|---|
| 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=2011-11-20.07; # UTC | 4 scriptversion=2013-12-25.23; # 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 # |
| 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 |
| 44 tab=' ' | |
| 44 nl=' | 45 nl=' |
| 45 ' | 46 ' |
| 46 IFS=" "" $nl" | 47 IFS=" $tab$nl" |
| 47 | 48 |
| 48 # set DOITPROG to echo to test this script | 49 # Set DOITPROG to "echo" to test this script. |
| 49 | 50 |
| 50 # Don't use :- since 4.3BSD and earlier shells don't like it. | |
| 51 doit=${DOITPROG-} | 51 doit=${DOITPROG-} |
| 52 if test -z "$doit"; then | 52 doit_exec=${doit:-exec} |
| 53 doit_exec=exec | |
| 54 else | |
| 55 doit_exec=$doit | |
| 56 fi | |
| 57 | 53 |
| 58 # Put in absolute file names if you don't have them in your path; | 54 # Put in absolute file names if you don't have them in your path; |
| 59 # or use environment vars. | 55 # or use environment vars. |
| 60 | 56 |
| 61 chgrpprog=${CHGRPPROG-chgrp} | 57 chgrpprog=${CHGRPPROG-chgrp} |
| 66 mkdirprog=${MKDIRPROG-mkdir} | 62 mkdirprog=${MKDIRPROG-mkdir} |
| 67 mvprog=${MVPROG-mv} | 63 mvprog=${MVPROG-mv} |
| 68 rmprog=${RMPROG-rm} | 64 rmprog=${RMPROG-rm} |
| 69 stripprog=${STRIPPROG-strip} | 65 stripprog=${STRIPPROG-strip} |
| 70 | 66 |
| 71 posix_glob='?' | |
| 72 initialize_posix_glob=' | |
| 73 test "$posix_glob" != "?" || { | |
| 74 if (set -f) 2>/dev/null; then | |
| 75 posix_glob= | |
| 76 else | |
| 77 posix_glob=: | |
| 78 fi | |
| 79 } | |
| 80 ' | |
| 81 | |
| 82 posix_mkdir= | 67 posix_mkdir= |
| 83 | 68 |
| 84 # Desired mode of installed file. | 69 # Desired mode of installed file. |
| 85 mode=0755 | 70 mode=0755 |
| 86 | 71 |
| 95 dst= | 80 dst= |
| 96 dir_arg= | 81 dir_arg= |
| 97 dst_arg= | 82 dst_arg= |
| 98 | 83 |
| 99 copy_on_change=false | 84 copy_on_change=false |
| 100 no_target_directory= | 85 is_target_a_directory=possibly |
| 101 | 86 |
| 102 usage="\ | 87 usage="\ |
| 103 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | 88 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE |
| 104 or: $0 [OPTION]... SRCFILES... DIRECTORY | 89 or: $0 [OPTION]... SRCFILES... DIRECTORY |
| 105 or: $0 [OPTION]... -t DIRECTORY SRCFILES... | 90 or: $0 [OPTION]... -t DIRECTORY SRCFILES... |
| 135 -C) copy_on_change=true;; | 120 -C) copy_on_change=true;; |
| 136 | 121 |
| 137 -d) dir_arg=true;; | 122 -d) dir_arg=true;; |
| 138 | 123 |
