X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/478c8f9ec06a8752cf8f5c3589f0994f738fb4e2..02baa030aa6273c97592f6790499f8892cb59223:/packages/mc/lib-shell.c.patch diff --git a/packages/mc/lib-shell.c.patch b/packages/mc/lib-shell.c.patch index 4fa2a4dc..3f3e96dd 100644 --- a/packages/mc/lib-shell.c.patch +++ b/packages/mc/lib-shell.c.patch @@ -1,30 +1,36 @@ -diff -u -r ../mc-4.8.16/lib/shell.c ./lib/shell.c ---- ../mc-4.8.16/lib/shell.c 2016-03-12 10:45:47.000000000 -0500 -+++ ./lib/shell.c 2016-03-14 20:31:50.981985797 -0400 -@@ -64,18 +64,14 @@ +diff -u -r ../mc-4.8.17/lib/shell.c ./lib/shell.c +--- ../mc-4.8.17/lib/shell.c 2016-05-07 11:42:52.000000000 -0400 ++++ ./lib/shell.c 2016-05-21 17:00:02.116441571 -0400 +@@ -64,20 +64,14 @@ mc_shell = g_new0 (mc_shell_t, 1); /* 3rd choice: look for existing shells supported as MC subshells. */ - if (access ("/bin/bash", X_OK) == 0) -+ if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/bash"); +- mc_shell->path = g_strdup ("/bin/bash"); - else if (access ("/bin/ash", X_OK) == 0) -+ else if (access ("@TERMUX_PREFIX@/bin/applets/ash", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/ash"); +- mc_shell->path = g_strdup ("/bin/ash"); - else if (access ("/bin/dash", X_OK) == 0) -+ else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/dash"); +- mc_shell->path = g_strdup ("/bin/dash"); - else if (access ("/bin/busybox", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/busybox"); - else if (access ("/bin/zsh", X_OK) == 0) -+ else if (access ("@TERMUX_PREFIX/bin/zsh", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/zsh"); +- mc_shell->path = g_strdup ("/bin/zsh"); - else if (access ("/bin/tcsh", X_OK) == 0) - mc_shell->path = g_strdup ("/bin/tcsh"); +- else if (access ("/bin/csh", X_OK) == 0) +- mc_shell->path = g_strdup ("/bin/csh"); ++ if (access ("@TERMUX_PREFIX@/bin/bash", X_OK) == 0) ++ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/bash"); ++ else if (access ("@TERMUX_PREFIX@/bin/ash", X_OK) == 0) ++ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/ash"); ++ else if (access ("@TERMUX_PREFIX@/bin/dash", X_OK) == 0) ++ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/dash"); ++ else if (access ("@TERMUX_PREFIX@/bin/zsh", X_OK) == 0) ++ mc_shell->path = g_strdup ("@TERMUX_PREFIX@/bin/zsh"); /* No fish as fallback because it is so much different from other shells and * in a way exotic (even though user-friendly by name) that we should not * present it as a subshell without the user's explicit intention. We rather -@@ -85,7 +81,7 @@ +@@ -87,7 +81,7 @@ */ else /* Fallback and last resort: system default shell */