[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

CVS:oo-deb/debian changelog,1.275,1.276 shell-lib.sh,1.7,1.8



Update of /cvs/debian-openoffice/oo-deb/debian
In directory gluck:/tmp/cvs-serv30648/debian

Modified Files:
	changelog shell-lib.sh 
Log Message:
add message() to shell-lib.sh

Index: shell-lib.sh
===================================================================
RCS file: /cvs/debian-openoffice/oo-deb/debian/shell-lib.sh,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- shell-lib.sh	11 Aug 2003 11:31:30 -0000	1.7
+++ shell-lib.sh	23 Mar 2004 02:54:08 -0000	1.8
@@ -1,5 +1,18 @@
 # vim:set ai et sts=2 sw=2 tw=0:
 
+# Query the terminal to establish a default number of columns to use for
+# displaying messages to the user.  This is used only as a fallback in the
+# event the COLUMNS variable is not set.  ($COLUMNS can react to SIGWINCH while
+# the script is running, and this cannot, only being calculated once.)
+DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
+if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
+  DEFCOLUMNS=80
+fi
+
+message() {
+	echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
+}
+
 trap "message;\
       message \"Received signal.  Aborting script $0.\";\
       message;\

Index: changelog
===================================================================
RCS file: /cvs/debian-openoffice/oo-deb/debian/changelog,v
retrieving revision 1.275
retrieving revision 1.276
diff -u -d -r1.275 -r1.276
--- changelog	22 Mar 2004 15:20:14 -0000	1.275
+++ changelog	23 Mar 2004 02:54:08 -0000	1.276
@@ -5,8 +5,10 @@
       least 1.1.1rc3 (closes: #239193) [CH]
   * debian/rules:
     - Remove new binary bitmaps for Red Hat [CH]
+  * debian/shell-lib.sh:
+    - add message() taken from xfree86 (closes: #233424)
 
- -- Chris Halls <halls@debian.org>  Mon, 22 Mar 2004 13:44:12 +0100
+ -- Rene Engelhard <rene@debian.org>  Tue, 23 Mar 2004 03:52:17 +0100
 
 openoffice.org (1.1.0+cvs20040317-1) unstable; urgency=low
 



Reply to: