chiark / gitweb /
libuv: Update from 1.20.0 to 1.20.1
[termux-packages] / packages / mc / lib-shell.c.patch
1 diff -u -r ../mc-4.8.17/lib/shell.c ./lib/shell.c
2 --- ../mc-4.8.17/lib/shell.c    2016-05-07 11:42:52.000000000 -0400
3 +++ ./lib/shell.c       2016-05-21 17:00:02.116441571 -0400
4 @@ -64,20 +64,14 @@
5      mc_shell = g_new0 (mc_shell_t, 1);
6  
7      /* 3rd choice: look for existing shells supported as MC subshells.  */
8 -    if (access ("/bin/bash", X_OK) == 0)
9 -        mc_shell->path = g_strdup ("/bin/bash");
10 -    else if (access ("/bin/ash", X_OK) == 0)
11 -        mc_shell->path = g_strdup ("/bin/ash");
12 -    else if (access ("/bin/dash", X_OK) == 0)
13 -        mc_shell->path = g_strdup ("/bin/dash");
14 -    else if (access ("/bin/busybox", X_OK) == 0)
15 -        mc_shell->path = g_strdup ("/bin/busybox");
16 -    else if (access ("/bin/zsh", X_OK) == 0)
17 -        mc_shell->path = g_strdup ("/bin/zsh");
18 -    else if (access ("/bin/tcsh", X_OK) == 0)
19 -        mc_shell->path = g_strdup ("/bin/tcsh");
20 -    else if (access ("/bin/csh", X_OK) == 0)
21 -        mc_shell->path = g_strdup ("/bin/csh");
22 +    if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0)
23 +        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/bash");
24 +    else if (access ("@TERMUX_PREFIX@/bin/ash", X_OK) == 0)
25 +        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/ash");
26 +    else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0)
27 +        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/dash");
28 +    else if (access ("@TERMUX_PREFIX@/bin/zsh", X_OK) == 0)
29 +        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/zsh");
30      /* No fish as fallback because it is so much different from other shells and
31       * in a way exotic (even though user-friendly by name) that we should not
32       * present it as a subshell without the user's explicit intention. We rather
33 @@ -87,7 +81,7 @@
34       */
35      else
36          /* Fallback and last resort: system default shell */
37 -        mc_shell->path = g_strdup ("/bin/sh");
38 +        mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/sh");
39  
40      return mc_shell;
41  }