dash: fix etc/profile hardcoded path (#2357)
authortomty89 <tom.ty89@gmail.com>
Sun, 22 Apr 2018 19:21:15 +0000 (03:21 +0800)
committerFredrik Fornwall <fredrik@fornwall.net>
Sun, 22 Apr 2018 19:21:15 +0000 (21:21 +0200)
packages/dash/build.sh
packages/dash/etc-profile.patch [new file with mode: 0644]

index 37a7aca..599d95f 100644 (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
diff --git a/packages/dash/etc-profile.patch b/packages/dash/etc-profile.patch
new file mode 100644 (file)
index 0000000..e629e0e
--- /dev/null
@@ -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");