diff --git a/packages/bash/build.sh b/packages/bash/build.sh index 90c504ddc..52fbb3a03 100755 --- a/packages/bash/build.sh +++ b/packages/bash/build.sh @@ -17,3 +17,7 @@ termux_step_pre_configure () { patch -p0 -i $PATCHFILE done } + +termux_step_post_make_install () { + sed "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|" $TERMUX_PKG_BUILDER_DIR/etc-profile > $TERMUX_PREFIX/etc/profile +} diff --git a/packages/bash/etc-profile b/packages/bash/etc-profile new file mode 100644 index 000000000..6328df443 --- /dev/null +++ b/packages/bash/etc-profile @@ -0,0 +1,8 @@ +if [ -d @TERMUX_PREFIX@/etc/profile.d ]; then + for i in @TERMUX_PREFIX@/etc/profile.d/*.sh; do + if [ -r $i ]; then + . $i + fi + done + unset i +fi