pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/editors/nvi-m17n Improve wrapper script, closing to us...
details: https://anonhg.NetBSD.org/pkgsrc/rev/145ae33c4ea4
branches: trunk
changeset: 535491:145ae33c4ea4
user: obache <obache%pkgsrc.org@localhost>
date: Mon Nov 19 12:24:06 2007 +0000
description:
Improve wrapper script, closing to usual behavior.
* Pass settings to nvi with env NEXINIT instead of EXINIT, to avoid affect of env NEXINIT.
* Honor NEXINIT, EXINIT environment variable.
* Pass all setting in ~/.{n}exrc by using source command. Fixes PR 13677.
Bump PKGREVISION.
diffstat:
editors/nvi-m17n/Makefile | 4 ++--
editors/nvi-m17n/files/nvi-m17n | 17 +++++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 1278bfa41152 -r 145ae33c4ea4 editors/nvi-m17n/Makefile
--- a/editors/nvi-m17n/Makefile Mon Nov 19 10:15:33 2007 +0000
+++ b/editors/nvi-m17n/Makefile Mon Nov 19 12:24:06 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.39 2007/11/17 13:40:15 wiz Exp $
+# $NetBSD: Makefile,v 1.40 2007/11/19 12:24:06 obache Exp $
DISTNAME= nvi-1.79
PKGNAME= nvi-m17n-1.79.20040401
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= editors
MASTER_SITES= ftp://ftp.sleepycat.com/pub/ \
ftp://ftp.foretune.co.jp/pub/tools/nvi/
diff -r 1278bfa41152 -r 145ae33c4ea4 editors/nvi-m17n/files/nvi-m17n
--- a/editors/nvi-m17n/files/nvi-m17n Mon Nov 19 10:15:33 2007 +0000
+++ b/editors/nvi-m17n/files/nvi-m17n Mon Nov 19 12:24:06 2007 +0000
@@ -1,9 +1,18 @@
#! /bin/sh
EXINIT0="set ${CANNA_OPT} autodetect=${AUTODETECT} fileencoding=${ENCODING} displayencoding=${ENCODING} inputencoding=${ENCODING} noskipdisplay"
-if [ -f ~/.exrc ]; then
- EXINIT="$EXINIT0 `sed -e '/^set /!d' -e 's/^set //' < ~/.exrc | tr '\012' ' '`"
+if [ "x$NEXINIT" != "x" -a "${NEXINIT-UNSET}" != "UNSET" ]; then
+ EXINIT1="$NEXINIT"
+elif [ "x$EXINIT" != "x" -a "${EXINIT-UNSET}" != "UNSET" ]; then
+ EXINIT1="$EXINIT"
else
- EXINIT=$EXINIT0
+ ecfile="/dev/null"
+ if [ -f "${HOME}/.nexrc" ]; then
+ rcfile="$HOME/.nexrc"
+ elif [ -f "${HOME}/.exrc" ]; then
+ rcfile="$HOME/.exrc"
+ fi
+ EXINIT1="source $rcfile"
fi
-export EXINIT
+NEXINIT="$EXINIT0|$EXINIT1"
+export NEXINIT
exec ${PREFIX}/bin/nvi "$@"
Home |
Main Index |
Thread Index |
Old Index