diff options
author | Eugene Lamskoy | 2023-10-13 17:01:04 +0300 |
---|---|---|
committer | Eugene Lamskoy | 2023-10-13 17:01:04 +0300 |
commit | c9d91fcf4b15c7cf9879df657e541a33a33dba67 (patch) | |
tree | 4b74583c1ce160047496ea2cfd55d73f3eb87b69 | |
parent | e468447eb9b716ad75cbcfc2ab7252623e527aca (diff) | |
download | aur-c9d91fcf4b15c7cf9879df657e541a33a33dba67.tar.gz |
Golded KOI8 encodings/locale check in wrapper golded script
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | golded | 27 |
3 files changed, 26 insertions, 7 deletions
@@ -21,6 +21,6 @@ pkgbase = golded-plus-git sha256sums = SKIP sha256sums = 30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d sha256sums = 3fbd050b9d087f2d386c3208115b11175ba0c6e728dc936c5d77cd244e83c6c3 - sha256sums = f8c52480a056045a4ef8adcce6c820d448a2c6b7096940a4fbfc970dfe9c8738 + sha256sums = 3f445aab458160fd3934de37165cf6d2bd32aacf770b813f2f772d823ef6f2a4 pkgname = golded-plus-git @@ -32,7 +32,7 @@ build() { make DESTDIR="${srcdir}/ncurses" install popd pushd "${pkgname}" - make WIDE_NCURSES=0 USE_NCURSES=1 KOI8=1 + make WIDE_NCURSES=0 USE_NCURSES=1 KOI8=1 -j$(nproc) pushd docs make tokentpl.txt make tokencfg.txt @@ -96,4 +96,4 @@ package() { sha256sums=('SKIP' '30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d' '3fbd050b9d087f2d386c3208115b11175ba0c6e728dc936c5d77cd244e83c6c3' - 'f8c52480a056045a4ef8adcce6c820d448a2c6b7096940a4fbfc970dfe9c8738') + '3f445aab458160fd3934de37165cf6d2bd32aacf770b813f2f772d823ef6f2a4') @@ -1,7 +1,26 @@ #!/bin/bash -GEDLNX=$(which gedlnx) -if [ ! -x $GEDLNX ]; then - echo gedlnx is not avaiable, sorry +_luit_encoding=koi8-r +_golded_lang=ru_RU.KOI8-R +_locale_check=koi8r +_locale_message="${_golded_lang} KOI8-R" +_gedlnx=$(which gedlnx) + +if [ ! -x ${_gedlnx} ]; then + echo "gedlnx is not avaiable/executable, sorry" exit 1 fi -TERM=xterm-256color exec /usr/bin/luit -x -encoding koi8-r -- "$GEDLNX" $* + +_has_locale=$(locale -a | grep ${_locale_check}) +if [ -z ${_has_locale} ]; then + echo -n "Checking system locale presence ${_locale_check}: " + echo "Not avaiable!" + echo "Add ${_locale_message} to /etc/locale.gen and run" + echo "sudo locale-gen" + exit 1 +fi + +if [ "$TERM" = "rxvt-unicode-256color" ]; then + TERM=xterm-256color LANG=${_golded_lang} exec luit -encoding ${_luit_encoding} -x -- "${_gedlnx}" "$@" +else + LANG=${_golded_lang} exec luit -encoding ${_luit_encoding} -x -- "${_gedlnx}" "$@" +fi |