gnu: Add txr.
[jackhill/guix/guix.git] / gnu / packages / patches / txr-shell.patch
1 Use the current shell instead of trying to find another one and
2 failing to do so.
3
4 diff --git a/configure b/configure
5 index f1adb919..7891b4dc 100755
6 --- a/configure
7 +++ b/configure
8 @@ -26,28 +26,6 @@
9 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11
12 -#
13 -# The #!/bin/sh might be some legacy piece of crap,
14 -# not even up to 1990 POSIX.2 spec. So the first step
15 -# is to look for a better shell in some known places
16 -# and re-execute ourselves with that interpreter.
17 -#
18 -
19 -if test x$txr_shell = x ; then
20 - for shell in /bin/bash /usr/bin/bash /usr/xpg4/bin/sh ; do
21 - if test -x $shell ; then
22 - txr_shell=$shell
23 - break
24 - fi
25 - done
26 - if test x$txr_shell = x ; then
27 - echo "No known POSIX shell found: falling back on /bin/sh, which may not work"
28 - txr_shell=/bin/sh
29 - fi
30 - export txr_shell
31 - exec $txr_shell $0 ${@+"$@"}
32 -fi
33 -
34 set -u
35
36 #
37 @@ -190,13 +168,6 @@ while [ $# -gt 0 ] ; do
38 exit 1
39 fi
40
41 - eval "var_exists=\${$var+y}"
42 -
43 - if [ "$var_exists" != y ] ; then
44 - printf "$0: nonexistent option: '%s'\n" "$1"
45 - exit 1
46 - fi
47 -
48 eval "$var='$val'"
49
50 eval "var_given_exists=\${${var}_given+y}"
51 @@ -208,6 +179,8 @@ while [ $# -gt 0 ] ; do
52 shift
53 done
54
55 +txr_shell=$CONFIG_SHELL
56 +
57 #
58 # If --help was given (or --help=<nonempty> or help=<nonempty>) then
59 # print help and exit. The termination status is failed, to indicate