Mercurial > hg > early-roguelike
annotate rogue3/install-sh @ 96:9fb343307b6b
Fix some 'test' failures when running 'make install'.
When shell variables are unexpectedly empty, 'test' gets the wrong
number of arguments and becomes unhappy. Logical AND should not be
done with 'test EXPR1 -a EXPR2' in such cases, because 'test' logic
does not short-circuit. Replace with 'test EXPR1 && test EXPR2'.
Shell logic does short-circuit, and if the first test invocation
fails, the second will never occur, and will never encounter missing
arguments.
| author | John "Elwin" Edwards |
|---|---|
| date | Tue, 27 Aug 2013 22:54:28 -0700 |
| parents | 07c4d4883ef2 |
| children |
| rev | line source |
|---|---|
| 88 | 1 #!/bin/sh |
| 2 # install - install a program, script, or datafile | |
| 3 | |
| 4 scriptversion=2011-11-20.07; # UTC | |
| 5 | |
| 6 # This originates from X11R5 (mit/util/scripts/install.sh), which was | |
| 7 # later released in X11R6 (xc/config/util/install.sh) with the | |
| 8 # following copyright and license. | |
| 9 # | |
| 10 # Copyright (C) 1994 X Consortium | |
| 11 # | |
| 12 # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 13 # of this software and associated documentation files (the "Software"), to | |
| 14 # deal in the Software without restriction, including without limitation the | |
| 15 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 16 # sell copies of the Software, and to permit persons to whom the Software is | |
| 17 # furnished to do so, subject to the following conditions: | |
|
07c4d4883ef2
rogue3: begin porting to autoconf. |
