Fixes in support of main inclusion, Bug #317214

* debian/control: remove buildeps on gettext, po4a, which are only called
    in the prebuild; depend on ${misc:Depends} with debhelper >= 5
  * debian/rules: use dh_testdir in get-orig-source, dh_clean to clean up
    build; run as 'debian/rules get-orig-source'; removing dh_installdirs as
    its not needed; add dh_md5sums
  * debian/dirs: not needed, removing
  * debian/copyright: updated to use canonical.com address, attribute
    Canonical copyright, and mention Nick as co-author
  * select-screen-profile.1: fixed typo
  * bin/*, *: use -e for shell scripts
  * bin/updates-available: cache updates available count in the user's
    homedir, rather than world-writable /var/tmp (race conditions exist)
  * screen-launcher.1, screen-profiles-helper.1: new manpages
This commit is contained in:
Dustin Kirkland 2009-01-16 16:44:10 -06:00
commit 0b6a007530
21 changed files with 104 additions and 60 deletions

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh -e
count=`grep -c "^processor.*:" /proc/cpuinfo` count=`grep -c "^processor.*:" /proc/cpuinfo`
if [ "$count" = "1" ]; then if [ "$count" = "1" ]; then

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh -e
mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | sed "s/^.*: //" | sed "s/\..*$//"` mhz=`grep -m 1 "^cpu MHz" /proc/cpuinfo | sed "s/^.*: //" | sed "s/\..*$//"`
if [ $mhz -gt 1000 -a -x /usr/bin/bc ]; then if [ $mhz -gt 1000 -a -x /usr/bin/bc ]; then

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh -e
cat /proc/loadavg | cut -d " " -f -1 cat /proc/loadavg | cut -d " " -f -1

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh -e
mem=`grep -m 1 "^MemTotal:" /proc/meminfo | sed 's/ kB$//' | sed 's/^.* //'` mem=`grep -m 1 "^MemTotal:" /proc/meminfo | sed 's/ kB$//' | sed 's/^.* //'`
if [ $mem -gt 1000000 -a -x /usr/bin/bc ]; then if [ $mem -gt 1000000 -a -x /usr/bin/bc ]; then

View file

@ -1,9 +1,4 @@
#!/bin/sh #!/bin/sh -e
if [ ! -x /usr/share/update-notifier/notify-reboot-required ]; then
echo "?"
exit 1
fi
if [ -e /var/run/reboot-required ]; then if [ -e /var/run/reboot-required ]; then
echo "(@)" echo "(@)"

View file

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh -e
/usr/bin/lsb_release -d -s | sed 's/\s*(.*)$//' /usr/bin/lsb_release -d -s | sed 's/\s*(.*)$//'

View file

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh -e
# expire the cache in X seconds; 1 hour by default # expire the cache in X seconds; 1 hour by default
EXPIRATION=3600 EXPIRATION=3600
@ -14,7 +14,7 @@ print_updates() {
} }
cache=/var/run/updates-available cache=/var/run/updates-available
mycache=/var/tmp/updates-available-$USER mycache=$HOME/.screenrc-updates-available
u= u=
# If global updates-available cache is present, use it. # If global updates-available cache is present, use it.
# Only available in Jaunty+. # Only available in Jaunty+.

17
debian/changelog vendored
View file

@ -6,13 +6,28 @@ screen-profiles (1.9) UNRELEASED; urgency=low
[ Dustin Kirkland ] [ Dustin Kirkland ]
* keybindings/common: fix leading whitespace on new window creation * keybindings/common: fix leading whitespace on new window creation
LP: #317558 LP: #317558
* keybindings/common, doc/help.txt: change the default escape sequence
back to ctrl-a
* profiles/common, bin/updates-available: the updates-available script now * profiles/common, bin/updates-available: the updates-available script now
caches its value, expiring that value every 60 minutes; so subsequent caches its value, expiring that value every 60 minutes; so subsequent
checks are much cheaper; we can allow the screen status script to run checks are much cheaper; we can allow the screen status script to run
more frequently now, since most will be cache checks; we'll really benefit more frequently now, since most will be cache checks; we'll really benefit
from this in Jaunty from this in Jaunty
* debian/control: remove buildeps on gettext, po4a, which are only called
in the prebuild; depend on ${misc:Depends} with debhelper >= 5
* debian/rules: use dh_testdir in get-orig-source, dh_clean to clean up
build; run as 'debian/rules get-orig-source'; removing dh_installdirs as
its not needed; add dh_md5sums
* debian/dirs: not needed, removing
* debian/copyright: updated to use canonical.com address, attribute
Canonical copyright, and mention Nick as co-author
* select-screen-profile.1: fixed typo
* bin/*, *: use -e for shell scripts
* bin/updates-available: cache updates available count in the user's
homedir, rather than world-writable /var/tmp (race conditions exist)
* screen-launcher.1, screen-profiles-helper.1: new manpages
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 15 Jan 2009 14:53:16 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 16 Jan 2009 16:29:47 -0600
screen-profiles (1.8-0ubuntu1) jaunty; urgency=low screen-profiles (1.8-0ubuntu1) jaunty; urgency=low

4
debian/control vendored
View file

@ -3,13 +3,13 @@ Section: misc
Priority: optional Priority: optional
Maintainer: Dustin Kirkland <kirkland@ubuntu.com> Maintainer: Dustin Kirkland <kirkland@ubuntu.com>
Standards-Version: 3.8.0 Standards-Version: 3.8.0
Build-Depends: debhelper (>= 6.0), gettext, po4a Build-Depends: debhelper (>= 5)
Homepage: http://launchpad.net/screen-profiles Homepage: http://launchpad.net/screen-profiles
Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/screen-profiles/main Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/screen-profiles/main
Package: screen-profiles Package: screen-profiles
Architecture: all Architecture: all
Depends: debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt Depends: ${misc:Depends}, debconf (>= 0.5) | debconf-2.0, screen, gettext-base, python, python-newt
Recommends: update-notifier-common Recommends: update-notifier-common
Suggests: bc Suggests: bc
Description: a set of useful profiles and a profile-switcher for GNU screen Description: a set of useful profiles and a profile-switcher for GNU screen

11
debian/copyright vendored
View file

@ -1,12 +1,15 @@
This package was debianized by Dustin Kirkland <dustin.kirkland@gmail.com> This package was debianized by Dustin Kirkland <kirkland@canonical.com>
Sun, 14 Dec 2008 13:11:37 -0600 Sun, 14 Dec 2008 13:11:37 -0600
It was downloaded from: http://launchpad.net/screen-profiles It was downloaded from: http://launchpad.net/screen-profiles
Upstream Authors: Dustin Kirkland <dustin.kirkland@gmail.com> Upstream Authors:
Dustin Kirkland <kirkland@canonical.com>
Nick Barcet <nick.barcet@ubuntu.com>
Copyright: Copyright:
Copyright (C) 2002-2008 Dustin Kirkland <dustin.kirkland@gmail.com> Copyright (C) 2008-2009 Canonical Ltd.
All rights reserved. All rights reserved.
License: License:
@ -31,5 +34,5 @@ License:
the icons are available at <http://www.famfamfam.com/lab/icons/silk/>. the icons are available at <http://www.famfamfam.com/lab/icons/silk/>.
The Ubuntu packaging: The Ubuntu packaging:
Copyright (C) 2008 by Dustin Kirkland <dustin.kirkland@gmail.com> Copyright (C) 2008-2009 Canonical Ltd.
released under the GPL-3. released under the GPL-3.

5
debian/dirs vendored
View file

@ -1,5 +0,0 @@
usr/bin
usr/share/screen-profiles
usr/share/screen-profiles/bin
usr/share/screen-profiles/keybindings
usr/share/screen-profiles/profiles

15
debian/rules vendored
View file

@ -5,11 +5,12 @@
# export DH_VERBOSE=1 # export DH_VERBOSE=1
PACKAGE=screen-profiles PACKAGE=screen-profiles
VER=`head -n 1 ./changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'` VER=`head -n 1 debian/changelog | sed 's/^.*(//' | sed 's/).*//' | sed 's/-.*//'`
get-orig-source: get-orig-source:
[ -d ../../${PACKAGE} ] && mv ../../${PACKAGE} ../../${PACKAGE}-${VER} || true dh_testdir
tar -C ../../ --exclude .bzr --exclude debian -zcvf ../../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER} -[ -d ../${PACKAGE} ] && mv ../${PACKAGE} ../${PACKAGE}-${VER}
tar -C ../ --exclude .bzr --exclude debian -zcvf ../${PACKAGE}_${VER}.orig.tar.gz ${PACKAGE}-${VER}
prebuild: prebuild:
cd po4a && po4a --no-backups po4a.conf cd po4a && po4a --no-backups po4a.conf
@ -17,13 +18,12 @@ prebuild:
build: build:
clean: clean:
rm -rf debian/${PACKAGE} debian/files debian/${PACKAGE}.debhelper.log dh_clean debian/${PACKAGE} debian/files debian/${PACKAGE}.debhelper.log
install:build install:build
dh_testdir dh_testdir
dh_testroot dh_testroot
dh_clean -k dh_clean -k
dh_installdirs -X.bzr
dh_install -X.bzr dh_install -X.bzr
# Everything else is handled by dh_install # Everything else is handled by dh_install
@ -33,7 +33,7 @@ binary-indep: build install
dh_testdir dh_testdir
dh_testroot dh_testroot
dh_installdocs -X.bzr dh_installdocs -X.bzr
dh_installman select-screen-profile.1 dh_installman screen-launcher.1 screen-profiles-helper.1 select-screen-profile.1
dh_installchangelogs README dh_installchangelogs README
dh_installdebconf dh_installdebconf
dh_compress dh_compress
@ -41,9 +41,10 @@ binary-indep: build install
dh_link /etc/screenrc usr/share/${PACKAGE}/profiles/plain dh_link /etc/screenrc usr/share/${PACKAGE}/profiles/plain
dh_installdeb dh_installdeb
dh_gencontrol dh_gencontrol
dh_md5sums
dh_builddeb dh_builddeb
binary: binary-indep binary: binary-indep
.PHONY: build clean binary-indep binary install prebuild .PHONY: build clean binary-indep binary install prebuild get-orig-source
binary-arch: binary-arch:

View file

@ -12,5 +12,3 @@ F5 Close this window | F9 Basic help (this)
Commands: Commands:
'screen -r' - reattach | 'man screen' - complete help 'screen -r' - reattach | 'man screen' - complete help
Note that the escape key has been changed from <ctrl-a> to <ctrl-g>.

View file

@ -28,25 +28,23 @@
# #
# bindkey commands should be followed by a comment that will be used in the # bindkey commands should be followed by a comment that will be used in the
# help file (one day). The command should be formated as: # help file (one day). The command should be formated as:
# <keys> | explanation # # <key> | explanation
# Changed the default escape from ctrl-a to ctrl-g, so as not to conflict # F-keys seem to work well in both gnome-terminal and tty consoles
# with emacs' ctrl-a # F1 | 'help' in gnome-terminal
escape ^Gg register n "^a^c^aA" # Goes with the F2 definition
# F1 -> 'help' in gnome-terminal bindkey -k k2 process n # F2 | Create new window (and name it)
register n "^g^c^gA" # Goes with the F2 definition bindkey -k k3 prev # F3 | Previous Window
bindkey -k k2 process n # F2 | Create new window (and name it) bindkey -k k4 next # F4 | Next Window
bindkey -k k3 prev # F3 | Previous Window bindkey -k k5 kill # F5 | Close window
bindkey -k k4 next # F4 | Next Window bindkey -k k6 detach # F6 | Detach from this session
bindkey -k k5 kill # F5 | Close window bindkey -k k7 copy # F7 | Enter copy/scrollback mode
bindkey -k k6 detach # F6 | Detach from this session bindkey -k k8 help # F8 | Advanced help/keybindings
bindkey -k k7 copy # F7 | Enter copy/scrollback mode
bindkey -k k8 help # F8 | Advanced help/keybindings
bindkey -k k9 screen -t help 0 screen-profiles-helper # F9 | Welcome screen bindkey -k k9 screen -t help 0 screen-profiles-helper # F9 | Welcome screen
# F10 -> 'toolbar' in gnome-terminal # F10 | 'toolbar' in gnome-terminal
# F11 -> 'fullscreen' in gnome-terminal # F11 | 'fullscreen' in gnome-terminal
# F12 # F12 |
# power detach # power detach
register x "^g^d D" register x "^a^d D"
bindkey ^[[3;6~ process x # C-shift-del | Detach and logout bindkey ^[[3;6~ process x # C-shift-del | Detach and logout

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash -e
# #
# GNU screen-profiles-helper # GNU screen-profiles-helper
# Copyright (C) 2008 Canonical Ltd. # Copyright (C) 2008 Canonical Ltd.

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh -e
# #
# GNU screen-profiles-helper # GNU screen-profiles-helper
# Copyright (C) 2008 Canonical Ltd. # Copyright (C) 2008 Canonical Ltd.
@ -26,7 +26,6 @@ install_screen_launcher() {
launcher="/usr/bin/screen-launcher" launcher="/usr/bin/screen-launcher"
# We have to make sure screen is called last # We have to make sure screen is called last
pos=$(( $(grep -ns "$launcher" "$dest" | sed 's/:.*$//' | head -1) )) pos=$(( $(grep -ns "$launcher" "$dest" | sed 's/:.*$//' | head -1) ))
do=0 do=0
if [ $pos -gt 0 ]; then if [ $pos -gt 0 ]; then
if [ $pos -lt $(( $(wc -l "$dest" | sed "s/ .*$//") -2)) ]; then if [ $pos -lt $(( $(wc -l "$dest" | sed "s/ .*$//") -2)) ]; then
@ -46,4 +45,3 @@ install_screen_launcher() {
install_screen_launcher "$HOME/.bashrc" install_screen_launcher "$HOME/.bashrc"
install_screen_launcher "$HOME/.bash_profile" install_screen_launcher "$HOME/.bash_profile"

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh -e
# #
# GNU screen-profiles-helper # GNU screen-profiles-helper
# Copyright (C) 2008 Canonical Ltd. # Copyright (C) 2008 Canonical Ltd.
@ -28,4 +28,3 @@ remove_screen_launcher() {
remove_screen_launcher "$HOME/.bashrc" remove_screen_launcher "$HOME/.bashrc"
remove_screen_launcher "$HOME/.bash_profile" remove_screen_launcher "$HOME/.bash_profile"

22
screen-launcher.1 Normal file
View file

@ -0,0 +1,22 @@
.TH screen\-launcher 1 "16 Jan 2009" screen-profiles "screen-profiles"
.SH NAME
screen\-launcher \- Screen Launcher
.SH DESCRIPTION
\fBscreen\-launcher\fP is a simple application that will launch "screen", reconnecting to an existing detached session (if available).
This script exists for simple insertion and removal from a user's ~/.screenrc file, by the \fBscreen\-profiles\-helper\fP utility.
.SH "SEE ALSO"
.PD 0
.TP
\fBscreen\fP(1), \fBscreen\-profiles\-helper\fP(1)
.TP
\fIhttp://launchpad.net/screen-profiles\fP
.PD
.SH AUTHOR
This manpage was written by Dustin Kirkland <kirkland@canonical.com> 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 or any later version 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.

20
screen-profiles-helper.1 Normal file
View file

@ -0,0 +1,20 @@
.TH screen\-profiles\-helper 1 "16 Jan 2009" screen-profiles "screen-profiles"
.SH NAME
screen\-profiles\-helper \- Configuration utility for screen\-profiles
.SH DESCRIPTION
\fBscreen\-profiles\-helper\fP is an application that can configure a number of options available in the screen\-profiles utility.
.SH "SEE ALSO"
.PD 0
.TP
\fBscreen\fP(1)
.TP
\fIhttp://launchpad.net/screen-profiles\fP
.PD
.SH AUTHOR
This manpage was written by Dustin Kirkland <kirkland@canonical.com> 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 or any later version 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.

View file

@ -73,11 +73,11 @@ prompt() {
for x in $profiles; do for x in $profiles; do
i=$(expr $i + 1) i=$(expr $i + 1)
desc=" " desc=" "
if [ $x = "ubuntu" ]; then if [ "$x" = "ubuntu" ]; then
desc="<---- ` gettext 'recommended'`" desc="<---- ` gettext 'recommended'`"
simple=$i simple=$i
fi fi
echo " $i. $x\t\t$desc" echo " $i. $x \t\t$desc"
done done
echo echo
selected=x selected=x

View file

@ -3,7 +3,7 @@
select\-screen\-profile \- Screen Profile Selector select\-screen\-profile \- Screen Profile Selector
.SH DESCRIPTION .SH DESCRIPTION
\fBselect\-screen\-profile\fP is an application lists the available screen profiles on a system and prompts the user to select one. \fBselect\-screen\-profile\fP is an application that lists the available screen profiles on a system and prompts the user to select one.
The selected profile will be symbolically linked into the current user's ~/.screenrc file, if that file does not yet exist, or is currently a symbolic link. The selected profile will be symbolically linked into the current user's ~/.screenrc file, if that file does not yet exist, or is currently a symbolic link.