summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index 56a93e09982..955d5c810cc 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.193 2014/11/26 15:52:30 ajacoutot Exp $
+# $OpenBSD: sysmerge.sh,v 1.194 2015/02/17 15:43:34 sthen Exp $
#
# Copyright (c) 2008-2014 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -366,7 +366,7 @@ sm_merge_loop() {
_tomerge=true
while ${_tomerge}; do
cp -p ${COMPFILE} ${COMPFILE}.merged
- sdiff -as -w ${_STTYSIZE} -o ${COMPFILE}.merged \
+ sdiff -as -w $(tput cols) -o ${COMPFILE}.merged \
${TARGET} ${COMPFILE}
_instmerged=v
while [[ ${_instmerged} == v ]]; do
@@ -620,8 +620,7 @@ _WRKDIR=$(mktemp -d -p ${TMPDIR:=/tmp} sysmerge.XXXXXXXXXX) || exit 1
_BKPDIR=${_WRKDIR}/backups
_TMPROOT=${_WRKDIR}/temproot
_RELINT=$(uname -r | tr -d '.') || exit 1
-_STTYSIZE=$(stty size | ( read r c; ((c==0)) && c=80; echo $c )) || exit 1
-readonly _WRKDIR _BKPDIR _TMPROOT _RELINT _STTYSIZE
+readonly _WRKDIR _BKPDIR _TMPROOT _RELINT
[[ -z ${VISUAL} ]] && EDITOR=${EDITOR:=/usr/bin/vi} || EDITOR=${VISUAL}
PAGER=${PAGER:=/usr/bin/more}