dash: fix etc/profile hardcoded path (#2357)

This commit is contained in:
tomty89 2018-04-23 03:21:15 +08:00 committed by Fredrik Fornwall
parent 344cdc35fd
commit a6aa402848
2 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://gondor.apana.org.au/~herbert/dash/
TERMUX_PKG_DESCRIPTION="Small POSIX-compliant implementation of /bin/sh"
TERMUX_PKG_ESSENTIAL=yes
TERMUX_PKG_VERSION=0.5.9.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=5ecd5bea72a93ed10eb15a1be9951dd51b52e5da1d4a7ae020efd9826b49e659
# Use a mirror as upstream has issues:
# TERMUX_PKG_SRCURL=http://gondor.apana.org.au/~herbert/dash/files/dash-${TERMUX_PKG_VERSION}.tar.gz

View File

@ -0,0 +1,13 @@
diff --git a/src/main.c b/src/main.c
index fcd3e7d..39b6e70 100644
--- a/src/main.c
+++ b/src/main.c
@@ -146,7 +146,7 @@ main(int argc, char **argv)
login = procargs(argc, argv);
if (login) {
state = 1;
- read_profile("/etc/profile");
+ read_profile("@TERMUX_PREFIX@/etc/profile");
state1:
state = 2;
read_profile("$HOME/.profile");