This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-goldedplus/bin/golded

30 lines
815 B
Plaintext
Raw Normal View History

#!/bin/sh
# run this file to launch GoldEd
# it also contains workaround for Russian language in UTF-8 encoding
# $Id$
# unconditionally bypass all tests for non-Russian locales
echo "$LC_ALL $LC_CTYPE $LANG" | grep -q "ru_" \
|| exec gedlnx $* || exit
# same for ru_RU.KOI8-R
echo "$LC_ALL $LC_CTYPE $LANG" | grep -q "ru_RU.KOI8-R" \
&& exec gedlnx $* || exit
CMD="gedlnx $*"
SCREENRC_GOLDED="/usr/share/golded-plus/screenrc_koi8r"
SCREEN=`which screen`
LUIT=`which luit`
if [ -n $SCREEN -a -s $SCREENRC_GOLDED ]; then
CMD_UTF8="$SCREEN -c ${SCREENRC_GOLDED}"
else if [ -n "$LUIT" ]; then
2010-11-11 15:35:06 +00:00
CMD_UTF8="export LC_ALL=ru_RU.KOI8-R ; exec $LUIT -x -encoding koi8-r -- $CMD"
else
CMD_UTF8=$CMD
fi
fi
echo "$LC_ALL $LC_CTYPE $LANG" | grep -q "ru_RU.UTF-8" \
2010-11-10 05:40:30 +00:00
&& ($CMD_UTF8) \
|| exec $CMD