From ed12262f3b28435d8c4782ac12a7eadb92f0d54d Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Tue, 21 Apr 2009 15:36:54 -0500 Subject: [PATCH] added manpage fixed mem-available comma/whitespace problem Signed-off-by: Dustin Kirkland --- bin/mem-available | 6 +++++- debian/changelog | 5 ++++- debian/rules | 2 +- screen-profiles-status.1 | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 screen-profiles-status.1 diff --git a/bin/mem-available b/bin/mem-available index c4c4732e..13db8c45 100755 --- a/bin/mem-available +++ b/bin/mem-available @@ -19,7 +19,11 @@ comma= whitespace= -grep -qs "^mem-used=1$" "$HOME/.screen-profiles/status" && comma="," || whitespace=" " +if [ -r "$HOME/.screen-profiles/status" ]; then + grep -qs "^mem-used=1$" "$HOME/.screen-profiles/status" && comma="," || whitespace=" " +else + comma="," +fi mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'` if [ $mem -ge 1048576 ]; then diff --git a/debian/changelog b/debian/changelog index 608be435..53044e72 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,11 @@ screen-profiles (1.48) unreleased; urgency=low ITP; I suppose we want to know if the diversion removal failed * screen-profiles, screen-profiles-status: default uptime status to 'on', generally useful, and pretty compact + * bin/mem-available: fix subtle bug where whitespace is printed if in a + totally default (no status file) configuration + * screen-profiles-status.1, debian/rules: manpage added - -- Dustin Kirkland Tue, 21 Apr 2009 15:11:29 -0500 + -- Dustin Kirkland Tue, 21 Apr 2009 15:35:34 -0500 screen-profiles (1.47-0ubuntu1) jaunty; urgency=low diff --git a/debian/rules b/debian/rules index 68f10ee9..100c9bda 100755 --- a/debian/rules +++ b/debian/rules @@ -57,7 +57,7 @@ binary-indep: build install dh_testdir -i dh_testroot -i dh_installdocs -X.bzr -i - dh_installman -i screen-launcher.1 screen-profiles.1 select-screen-profile.1 motd+shell.1 screen-profiles-export.1 + dh_installman -i screen-launcher.1 screen-profiles.1 select-screen-profile.1 motd+shell.1 screen-profiles-export.1 screen-profiles-status.1 dh_installchangelogs -i dh_installdebconf -i dh_compress -i diff --git a/screen-profiles-status.1 b/screen-profiles-status.1 new file mode 100644 index 00000000..916c6f81 --- /dev/null +++ b/screen-profiles-status.1 @@ -0,0 +1,15 @@ +.TH screen-profiles-status 1 "21 Apr 2009" screen-profiles "screen-profiles" +.SH NAME +screen\-profiles\-status \- Common starting point for running screen\-profiles status commands + +.SH DESCRIPTION +\fBscreen\-profiles\-status\fP is a simple script that takes a single argument: a script defined in /var/lib/screen\-profiles. This wrapper is useful for doing some common functionality, like setting the cpu and/or io proirity, determining sane defaults, pre/post processing. + +.TP +\fIhttp://launchpad.net/screen-profiles\fP +.PD + +.SH AUTHOR +This manpage and the \fBscreen\-profiles\-status\fP utility was written by Dustin Kirkland for Ubuntu systems (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 published by the Free Software Foundation. + +On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.