lesspipe: Do not try to invoke `locale` command

This commit is contained in:
Tee KOBAYASHI 2022-03-02 14:21:45 +09:00 committed by xtkoba
parent 0bd4ef5dbe
commit 8163a49db7
2 changed files with 13 additions and 0 deletions

View File

@ -3,11 +3,13 @@ TERMUX_PKG_DESCRIPTION="An input filter for the pager less"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.04
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/wofr06/lesspipe/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b65ee79b7b51510e6f2097a22d3c7985805a53d9e33b0afdfe129f2a1f89cc23
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="less"
TERMUX_PKG_SUGGESTS="imagemagick, p7zip, unrar, unzip"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure() {

View File

@ -0,0 +1,11 @@
--- a/lesspipe.sh
+++ b/lesspipe.sh
@@ -719,7 +719,7 @@
setopt sh_word_split 2>/dev/null
PATH=$PATH:${0%%/lesspipe.sh}
# the current locale in lowercase (or generic utf-8)
-locale=$(locale|grep LC_CTYPE|sed 's/.*"\(.*\)"/\1/') || locale=en_US.UTF-8
+locale=en_US.UTF-8
lclocale=$(echo ${locale##*.}|tr '[A-Z]' '[a-z]')
sep=: # file name separator