gpgme: Update from 1.10.0 to 1.11.1
[termux-packages] / packages / mc / lib-shell.c.patch
CommitLineData
f4147b42
FF
1diff -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 @@
478c8f9e
FF
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)
f4147b42 9- mc_shell->path = g_strdup ("/bin/bash");
478c8f9e 10- else if (access ("/bin/ash", X_OK) == 0)
f4147b42 11- mc_shell->path = g_strdup ("/bin/ash");
478c8f9e 12- else if (access ("/bin/dash", X_OK) == 0)
f4147b42 13- mc_shell->path = g_strdup ("/bin/dash");
478c8f9e
FF
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)
f4147b42 17- mc_shell->path = g_strdup ("/bin/zsh");
478c8f9e
FF
18- else if (access ("/bin/tcsh", X_OK) == 0)
19- mc_shell->path = g_strdup ("/bin/tcsh");
f4147b42
FF
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");
478c8f9e
FF
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
f4147b42 33@@ -87,7 +81,7 @@
478c8f9e
FF
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 }