From a878e2b206dfac953c937ea28608fa6155680a79 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 30 Oct 2020 22:43:00 +0200 Subject: [PATCH] fix Termux hardcoded directories in vim, vim-python --- packages/vim-python/build.sh | 3 ++- packages/vim-python/vimrc | 2 +- packages/vim/build.sh | 3 ++- packages/vim/vimrc | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/vim-python/build.sh b/packages/vim-python/build.sh index d70033996..a63b3133b 100644 --- a/packages/vim-python/build.sh +++ b/packages/vim-python/build.sh @@ -66,7 +66,8 @@ termux_step_pre_configure() { } termux_step_post_make_install() { - cp $TERMUX_PKG_BUILDER_DIR/vimrc $TERMUX_PREFIX/share/vim/vimrc + sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PKG_BUILDER_DIR/vimrc \ + > $TERMUX_PREFIX/share/vim/vimrc # Remove most tutor files: cp $TERMUX_PREFIX/share/vim/vim82/tutor/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PKG_TMPDIR/ diff --git a/packages/vim-python/vimrc b/packages/vim-python/vimrc index 9ffc57c51..6d705cb2b 100644 --- a/packages/vim-python/vimrc +++ b/packages/vim-python/vimrc @@ -77,7 +77,7 @@ if has('path_extra') endif if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) - set shell=/data/data/com.termux/files/usr/bin/env\ bash + set shell=@TERMUX_PREFIX@/bin/env\ bash endif set autoread diff --git a/packages/vim/build.sh b/packages/vim/build.sh index 2cdb1c67f..5ab3ebe23 100644 --- a/packages/vim/build.sh +++ b/packages/vim/build.sh @@ -52,7 +52,8 @@ termux_step_pre_configure() { } termux_step_post_make_install() { - cp $TERMUX_PKG_BUILDER_DIR/vimrc $TERMUX_PREFIX/share/vim/vimrc + sed -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PKG_BUILDER_DIR/vimrc \ + > $TERMUX_PREFIX/share/vim/vimrc # Remove most tutor files: cp $TERMUX_PREFIX/share/vim/vim82/tutor/{tutor,tutor.vim,tutor.utf-8} $TERMUX_PKG_TMPDIR/ diff --git a/packages/vim/vimrc b/packages/vim/vimrc index 9ffc57c51..6d705cb2b 100644 --- a/packages/vim/vimrc +++ b/packages/vim/vimrc @@ -77,7 +77,7 @@ if has('path_extra') endif if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276')) - set shell=/data/data/com.termux/files/usr/bin/env\ bash + set shell=@TERMUX_PREFIX@/bin/env\ bash endif set autoread