diff --git a/check-enhancements b/check-enhancements index 1327387..a24a692 100755 --- a/check-enhancements +++ b/check-enhancements @@ -128,7 +128,7 @@ # process package names given on the cmdline for cmdline_pkg in "${PKGS[@]}" -do +do pkgs_enhancing_pkg_status $cmdline_pkg done diff --git a/checkrestart b/checkrestart index 4531d33..f564443 100755 --- a/checkrestart +++ b/checkrestart @@ -5,7 +5,7 @@ # - included patch from Justin Pryzby # to work with the latest Lsof - modify to reduce false positives by not # complaining about deleted inodes/files under /tmp/, /var/log/, -# /var/run or named /SYSV. +# /var/run or named /SYSV. # - introduced a verbose option # PENDING: @@ -14,7 +14,7 @@ # (available at http://robots.org.uk/src/psdel) # - make it work with a whitelist of directories instead of a blacklist # (might make it less false positive prone) -# +# # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA # # On Debian systems, a copy of the GNU General Public License may be @@ -284,7 +284,7 @@ restartServiceCommands.extend(['systemctl restart ' + s for s in package.systemdservice]) else: nonrestartable.append(package) - + if len(restartable) > 0: print() print("Of these, %d seem to contain systemd service definitions or init scripts which can be used to restart them." % len(restartable)) @@ -294,7 +294,7 @@ print(package.name + ':') for process in package.processes: print("\t%s\t%s" % (process.pid,process.program)) - + if len(restartServiceCommands)>0: print() print("These are the systemd services:") @@ -488,7 +488,7 @@ if f.startswith('/usr/lib/locale/'): return 0 # Skip files from the user's home directories - # many processes hold temporafy files there + # many processes hold temporafy files there if f.startswith('/home/'): return 0 # Skip automatically generated files @@ -695,7 +695,7 @@ if f.startswith('/usr'): statinfo = os.lstat('/usr')[ST_MODE] # If /usr is a symlink then find where it points to - if S_ISLNK(statinfo): + if S_ISLNK(statinfo): newusr = os.readlink('/usr') if not newusr.startswith('/'): # If the symlink is relative, make it absolute diff --git a/checkrestart.1 b/checkrestart.1 index 95f58d5..4b40831 100644 --- a/checkrestart.1 +++ b/checkrestart.1 @@ -5,7 +5,7 @@ .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2, or (at your option) .\" any later version. -.\" +.\" .\" On Debian systems, a copy of the GNU General Public License version 2 .\" can be found in /usr/share/common-licenses/GPL-2. .TH checkrestart 1 "December 19 2006" "debian\-goodies" "debian\-goodies" diff --git a/debget b/debget index 3892222..0b6d3ae 100755 --- a/debget +++ b/debget @@ -28,7 +28,7 @@ { echo "Usage: `basename $0` [--help] package" } - + if [ $# -eq 0 ] ; then usage exit 1 @@ -41,7 +41,7 @@ esac # First check if apt-get is sane enough before proceeding -set +e +set +e apt-get -q2 --print-uris --reinstall install "dpkg" 2>/dev/null >/dev/null if [ $? -ne 0 ] ; then echo "ERROR: There was an error calling apt-get. Check that the database is in a consistent state and try again" @@ -51,7 +51,7 @@ echo "ERROR: Your apt lists are empty. Update your package database" echo "using 'apt-get update'" fi -set -e +set -e for pkgspec in $*; do @@ -66,7 +66,7 @@ set -e # This provides only one version, but it's better than the apt-get # call which will not work in packages not available locally - apt-cache show "$pkgspec" 2>/dev/null | grep ^Ver | + apt-cache show "$pkgspec" 2>/dev/null | grep ^Ver | while read version; do version=`echo $version | sed -ne '$s/^.*: \(.*\).*$/\1/p'` echo "($pkgspec -> $version)" diff --git a/debian/changelog b/debian/changelog index 49bf4bc..464edfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -111,7 +111,7 @@ * [dglob, dglob.pod] - Add a new '-n' option to make it possible to search for packages that are available but not installed, thanks to A. Costa (Closes: #594959) - + * Change license of manual pages written by author to GPL-2 -- Javier Fernández-Sanguino Peña Fri, 23 Jan 2015 01:07:34 +0100 @@ -172,7 +172,7 @@ debian-goodies (0.61) unstable; urgency=low - * [checkrestart] + * [checkrestart] - Prover fix to avoid false positives due to /drm (Closes: #548380) - Add patch provided by Tollef Fog Heen which includes a new -b (blacklist) option. This makes it possible for system @@ -195,8 +195,8 @@ list of items - Improve handling of interpreted files using patch provided by Guillaume Delacour and Michal Fiala (Closes: #657087) - * [debget] - - Allow error in apt calls since those are handled by the script + * [debget] + - Allow error in apt calls since those are handled by the script (Closes: 676715) -- Javier Fernández-Sanguino Peña Sat, 16 Jun 2012 04:22:24 +0200 @@ -242,8 +242,8 @@ debian-goodies (0.59) unstable; urgency=low - * [checkrestart]: - - Properly define variables to prevent Python errors when using the + * [checkrestart]: + - Properly define variables to prevent Python errors when using the -p switch (Closes: #646513) - Pass a default environment for all subprocess calls @@ -251,15 +251,15 @@ debian-goodies (0.58) unstable; urgency=low - * [dglob] + * [dglob] - Remove any empty lines from grep-dctrl's output (Closes: 646189) -- Javier Fernandez-Sanguino Pen~a Sun, 23 Oct 2011 13:54:27 +0200 debian-goodies (0.57) unstable; urgency=low - * [checkrestart]: - - Exclude /run/ from the deleted files check, this prevents + * [checkrestart]: + - Exclude /run/ from the deleted files check, this prevents false positives from some programs such as newer releases of jackd2 and chromium which use /run/shm/ instead of /dev/shm/ (Closes: #595096) @@ -268,7 +268,7 @@ debian-goodies (0.56) unstable; urgency=low - * [checkrestart]: + * [checkrestart]: - Use patch provided by Jörg Sommer and Piotr Kaczuba that makes the script use a set for the initscripts information, thus making the program work with Python 2.7 (Closes: #643977) @@ -276,18 +276,18 @@ not belong to any package, thanks to Peter Eisentraut for the patch. (Closes: #608387) - Fix handling of --verbose option (Closes: #623168) - - Exclude /dev/shm/ from the deleted files check, this prevents + - Exclude /dev/shm/ from the deleted files check, this prevents a false positive from some programs such as jackd2 (Closes: #595096) - Exclude /home from the deleted files check as these generate a number of false positives. This included: GNOME's mixer applet, dovecot, nautilus, chromium-broswer and evolution-data-server (Closes: #595096, #609454) - * [checkrestart.1]: + * [checkrestart.1]: - Update the manpage to indicate what information to provide when reporting a false positive in checkrestart * /debmany/man/debmany.1: - Fix typo in manpage (Closes: #600252) - + -- Javier Fernandez-Sanguino Pen~a Sun, 09 Oct 2011 20:51:11 +0200 @@ -332,7 +332,7 @@ * [dpigs] Fix getopt configuration for -h. Thanks Jakub Wilk for spotting this. (Closes: #584580) * Bump Standards-Version to 3.9.1 (no changes) - + -- Axel Beckert Wed, 04 Aug 2010 12:35:05 +0200 debian-goodies (0.52) unstable; urgency=low @@ -375,13 +375,13 @@ with processes that lack a proper link /proc/$PID/exe. This seems to happen with UML processes and confused the program. (Closes: 522850) * Include patches provided by Joerg Sommer for checkrestart: - (Closes: 511537) + (Closes: 511537) - Set locale to POSIX ('C') since the output of dpkg is localized and localisations makes the match for diversions fail. - Skip the last output line from diversions since it is a summary listing packages that are part of a diversion. - Use dpkg-query instead of dpkg since dpkg-query is the generic interface - for querying the dpkg database is dpkg-query, and dpkg is only a + for querying the dpkg database is dpkg-query, and dpkg is only a wrapper for it. - Removed useless check in the isdeletedFile function that covers mutt in /tmp since there is already a match for /tmp @@ -408,7 +408,7 @@ debian-goodies (0.48) unstable; urgency=low * Provide dhomepage application (and manual page) that can be used - to open a packages' homepage. This program was provided by + to open a packages' homepage. This program was provided by Thadeu Lima de Souza Cascardo (Closes: 500397) * Document degrep, dfgrep and dzgrep through the dgrep manpage by creating a symlink during package installation, thanks to Xavier Luthi for the @@ -423,14 +423,14 @@ - adjust command line options in usage() (Closes: 497611) * dpigs: Use script snipet provided by Aaron M. Ucko to make it possible - to group by source package, use a new (-S, --source) option. + to group by source package, use a new (-S, --source) option. (Closes: 511349) - * debget: + * debget: - check the contents of /var/lib/apt/lists before executing apt to warn if there is no Release information there - document that APT's package database needs to be up-to-dat if a package is not found (might happen to aptitude users) - * popbugs: adjust error message: + * popbugs: adjust error message: - popularity contest is now run through cron.daily - provide the command line needed to generate the popconf data (Closes: 500432) @@ -483,7 +483,7 @@ - add bash_completion example into examples - add less to Depends, as it is the default viewer for other files. - add zenity to Suggests, it is a graphical alternative for dialog. - * Fix popbugs to prevent it from removing temporary files before the browser + * Fix popbugs to prevent it from removing temporary files before the browser has opened them, thanks to Chris Lamb for the bug report and the fix (Closes: #471752) * checkrestart: @@ -506,7 +506,7 @@ uploading, oops. (Closes: #405040) * Add myself to author list in debian/copyright, and fixed a lintian warning there too. - + -- Javier Fernandez-Sanguino Pen~a Thu, 10 Jul 2008 00:30:39 +0200 debian-goodies (0.41) unstable; urgency=low @@ -519,7 +519,7 @@ debian-goodies (0.40) unstable; urgency=low * checkrestart: - - skip deleted files under /dev/pts/ to prevent telling users to + - skip deleted files under /dev/pts/ to prevent telling users to restart gpm (Closes: 468124) - support /usr being symlinked (Closes: 405040) - minor changes in output messages. @@ -529,7 +529,7 @@ debian-goodies (0.39) unstable; urgency=low * Remove the network-test script, which now has been moved to the - ifupdown-extra package. Also remove the dependencies introduced by + ifupdown-extra package. Also remove the dependencies introduced by that script. -- Javier Fernandez-Sanguino Pen~a Tue, 18 Dec 2007 21:37:18 +0100 @@ -622,7 +622,7 @@ * Network-test: use -t switch to use user's TMPDIR or /tmp instead of trying to create it under $PWD (Closes: #432311) * Add a Suggests: netcat (Closes: #400479) - * popbugs: + * popbugs: * Make it parse the new format of the RC buglist properly (Closes: #421355) * Add a debug option * Fix a typo in the output @@ -632,7 +632,7 @@ debian-goodies (0.28) unstable; urgency=low - * Apply patch by Francesco Potorti that makes checkrestart list + * Apply patch by Francesco Potorti that makes checkrestart list processes that should be restarted when a daemon is restarted. This helps warn users that some processes will not be restarted even though they use the init script (such as active ssh connections). And @@ -653,7 +653,7 @@ (Note I have included the code from Sam Morris, available at http://robots.org.uk/src/psdel and contributed in the BTS. But it still needs to be massaged to work as a replacement for lsof) - * Write a manpage for checkrestart so administrators are aware that this + * Write a manpage for checkrestart so administrators are aware that this tool should not be completely relied on. (Closes: #305279) * Update the version of network-test which fixes some of the bugs already fixed in the experimental 'ifupdown-extra' package: @@ -666,7 +666,7 @@ installed (just recommends its installation) * Fix duplicate spaces in the script as well as some typos with patch provided by Norbert Kiesel (Closed: #400463) - * Change behaviour of network-test when testing ethernet link + * Change behaviour of network-test when testing ethernet link (based on ifupdown-extra's 'check-network-cable' tests) this is better (and more reliable) than just using 'ifconfig' but requires users install additional software. @@ -808,7 +808,7 @@ debian-goodies (0.14) unstable; urgency=low - * Minor formatting changes to checkrestart + * Minor formatting changes to checkrestart * New program, popbugs, which sorts and filters the RC bug list based on data from popularity-contest * Suggests: popularity-contest @@ -839,20 +839,20 @@ debian-goodies (0.10) unstable; urgency=low * Modify checkrestart to use dpkg rather than dpkg-query, so that it can be - used on stable and does not require a dependency on newer dpkg + used on stable and does not require a dependency on newer dpkg -- Matt Zimmerman Fri, 2 May 2003 10:19:15 -0400 debian-goodies (0.9) unstable; urgency=low - * Add dependencies on lsof and python + * Add dependencies on lsof and python -- Matt Zimmerman Wed, 30 Apr 2003 14:20:54 -0400 debian-goodies (0.8) unstable; urgency=low * New program, checkrestart, which informs about running processes using old - versions of upgraded files (such as shared libraries) + versions of upgraded files (such as shared libraries) -- Matt Zimmerman Wed, 30 Apr 2003 13:53:25 -0400 diff --git a/debmany/man/debmany.1 b/debmany/man/debmany.1 index a02b3ef..2b0d68f 100644 --- a/debmany/man/debmany.1 +++ b/debmany/man/debmany.1 @@ -4,89 +4,89 @@ .SH "SYNOPSIS" .B debmany \fI\-\-help -.br +.br .B debmany \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L limit] [\-l lang1[,...]] package|package.deb\fR -.br +.br .B debmany \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L limit] [\-l lang1[,...]] \-z [package|package.deb]\fR .SH "DESCRIPTION" .\" Add any additional description here -.PP +.PP Select a manpage or files in /usr/share/doc from a Debian package for viewing with "man", "sensible-pager" or an alternative viewer. The list of files is displayed in a dialog. Supported locations for Debian packages are: local .deb\-file, a package in the repository or an installed package. -.TP +.TP \fB\-\-help\fR display a short usage guide and exit -.TP +.TP \fB\-k\fR Display the manpage using your preferred viewer (must support .gz files) if you use KDE \- this is the short form of \-m 'kfmclient exec man:%s'. "kfmclient" is a part of the package "konqueror" (at least in Debian Etch). -.TP +.TP \fB\-g\fR Display the manpage using your preferred viewer (must support .gz files) if you use GNOME \- this is the short form of \-m 'gnome\-open man:%s'. "gnome\-open" is a part of the package "libgnome2\-0" (at least in Debian Etch). -.TP +.TP \fB\-x\fR Display the manpage using your preferred viewer (must support .gz files) if you use KDE/GNOME/Xfce \- this is the short form of \-m 'xdg\-open man:%s'. "xdg\-open" is a part of the package "xdg\-utils" (at least in Debian Etch). -.TP +.TP \fB\-m manpageviewer\fR Optionally set a manpage viewer. The viewer must support .gz files. You must define the complete request. "%s" gets replaced with the path to the manpage. If "%s" is missing " %s" is appended to the manpageviewer. The manpageviewer must be enclosed with "" or '' \- see examples. If you use a graphical viewer you must ensure that you have access to your desktop (if necessary: sux or ssh with X\-forwarding) -.TP +.TP \fB\-o otherviewer\fR Optionally set a viewer for other files (/usr/share/doc). -.TP +.TP \fB\-L limit\fR If a file which must be downloaded exceeds this limit, you are asked if the download should start. Without unit the value is in bytes. You can append K, M, G or T to the value to change the unit. -.TP +.TP \fB\-l lang1[,...]\fR English manpages are displayed always. If you want more languages you can specify them here. Provide a comma separated list of the folder names in the manpage folders (/usr/share/man) \- e.g. de,fr or "zh*" if you want to see all Chinese manpages (Simplified and Traditional Chinese as well). It is safe always to use "*" at the end of your language. Character set versions automatically generated during installation are not available for selection. -.TP +.TP \fB\-z\fR Zenity (a graphical dialog) is used to select the files and if necessary to enter the package name. You must have the rights to start X programs. This option combined with the parameters \-k, \-g, \-x or \-m and \-o make it possible to use debmany without console. -.PP +.PP The manpages are temporarily extracted to a temporary directory under /tmp (or /var/tmp, if /tmp is not a directory). You can override the path if you set and export the environment variable TMPDIR or set it as a temporary variable. -.PP +.PP You need to have the Debian package "whiptail" (preferred) or "dialog" as well as "curl" installed. .SH "EXAMPLES" -.TP +.TP debmany coreutils Show all manpages from the installed Debian package "coreutils" using man. -.TP +.TP debmany 3dchess Show all manpages from the package "3dchess" using man. Since it is not already installed the package is accessed from the repository \- even downloading is done if needed. -.TP +.TP debmany test.deb Show all manpages from the local Debian package "./test.deb" using man. -.TP +.TP debmany \-k sc Use your preferred man\-viewer (for KDE users). -.TP +.TP debmany \-g sc Use your preferred man\-viewer (for GNOME users). -.TP +.TP debmany \-x sc Use your preferred man\-viewer (for KDE/GNOME/XFCE users). -.TP +.TP debmany \-z \-k Uses "zenity" to select files and to enter the package name. -.TP +.TP TMPDIR=~/tmp debmany \-m 'konqueror man:%s' sc Use ~/tmp as temporary folder and Konqueror as viewer. -.TP +.TP alias debmany='debmany \-l de \-L 5M \-k'; debmany \-m man \-l "zh*" foo Set an alias with your preferred options and override them if needed. -.TP +.TP vi /usr/local/bin/ask # after saving: chmod 755 ask #!/bin/dash -.br +.br read \-p "program to use: " pgm -.br +.br eval $pgm "$1" -.br +.br -.br +.br debmany \-o ask -.br +.br Every time you select other files from a package you will be asked which program to use. .SH "AUTHOR" Written by Michael Arlt. diff --git a/debmany/man/debmany.de.1 b/debmany/man/debmany.de.1 index adafcec..727620c 100644 --- a/debmany/man/debmany.de.1 +++ b/debmany/man/debmany.de.1 @@ -4,89 +4,89 @@ .SH "SYNTAX" .B debmany \fI\-\-help -.br +.br .B debmany \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L Limit] [\-l Sprache1[,...]] Paket|Paket.deb\fR -.br +.br .B debmany \fI[\-v[v]] [\-k|\-g|\-x] [\-m manpageviewer] [\-o otherviewer] [\-L Limit] [\-l Sprache1[,...]] \-z [Paket|Paket.deb]\fR .SH "BESCHREIBUNG" .\" Add any additional description here -.PP +.PP Wählen Sie eine Manpage oder Dateien aus usr/share/doc von einem Debian Paket um sie mit "man" oder "sensible-pager" bzw. einem alternativen Viewer zu betrachten. Die Liste der Dateien wird in einem Dialog dargestellt. Unterstützte Quellen für Debian Pakete sind: Lokale .deb\-Datei, ein Paket aus dem Repository oder ein installiertes Paket. -.TP +.TP \fB\-\-help\fR zeigt eine kurze Hilfe und beendet sich -.TP +.TP \fB\-k\fR Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE benutzen \- Kurzform von \-m 'kfmclient exec man:%s' bzw. 'kfmclient exec %s' für andere Dateien. "kfmclient" ist Teil des Paketes "konqueror" (zumindest in Debian Etch). -.TP +.TP \fB\-g\fR Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie GNOME benutzen \- Kurzform von \-m 'gnome\-open man:%s'. "gnome\-open" ist Teil des Paketes "libgnome2\-0" (zumindest in Debian Etch). -.TP +.TP \fB\-x\fR Zeigt die Manpage im bevorzugten Viewer (muss .gz Dateien unterstützen) an, falls Sie KDE/GNOME/Xfce benutzen \- Kurzform von \-m 'xdg\-open man:%s'. "xdg\-open" ist Teil des Paketes "xdg\-utils" (zumindest in Debian Etch). -.TP +.TP \fB\-m manpageviewer\fR Überschreibt den Manpageviewer. Der Viewer muss .gz Dateien unterstützen. Es ist zu beachten, dass der komplette Aufruf formuliert werden muss. "%s" wird durch den Pfad zur Manpage ersetzt. Wenn "%s" fehlt wird " %s" an den Manpageviewer angehängt. Der Aufruf muss in "" oder '' gefasst werden \- siehe Beispiele. Bei der Benutzung eines grafischen Manpageviewers müssen Sie sicherstellen, dass Sie Zugriff auf den Desktop haben (ggf.: sux oder ssh mit x\-forwarding) -.TP +.TP \fB\-o otherviewer\fR Überschreibt den Viewer für sonstige Dateien (/usr/share/doc). -.TP +.TP \fB\-L Limit\fR Überschreitet ein File, das per Download heruntergeladen werden muss, das Limit so werden Sie gefragt, ob der Download stattfinden soll. Ohne Angabe einer Einheit ist die Angabe in Bytes. Durch Anhängen der Buchstaben K, M, G oder T kann die Einheit geändert werden. -.TP +.TP \fB\-l Sprache1[,...]\fR Englische Manpages werden immer angezeigt. Wenn Sie mehr Sprachen sehen wollen, so können Sie dies hier festlegen. Im Prinzip geben Sie hier eine mit Komma getrennte Liste der Ordner aus den Manpage Ordnern (/usr/share/man) an \- z. B. de,fr oder "zh*" wenn Sie alle chinesischen Manpages (sowohl das einfache "zh_CN" als auch das traditionelle Chinesisch "zh_TW") sehen wollen. Sicherheitshalber kann man auch immer "*" am Ende der Sprache anhängen. Bei der Installation ggf. dynamisch generierte zeichensatzbasierte Abwandlungen stehen nicht zur Auswahl. -.TP +.TP \fB\-z\fR Zur Auswahl der Dateien und ggf. zur Eingabe des Paketes wird "zenity" (grafischer Dialog) verwendet. Hierzu muss man berechtigt sein, X\-Programme zu starten. Diese Option in Kombination mit den Parametern \-k, \-g, \-x bzw. \-m und \-o ermöglicht es, debmany ohne Console zu verwenden. -.PP +.PP Die Manpages werden temporär nach /tmp oder /var/tmp extrahiert. Durch das Setzen und Exportieren der Umgebungsvariable TMPDIR bzw. das Setzen als temporären Variable kann der Speicherort überschrieben werden. -.PP +.PP Das Debian Paket "whiptail" (bevorzugt) oder "dialog" sowie "curl" muss installiert sein. .SH "BEISPIELE" -.TP +.TP debmany coreutils Zeigt alle Manpages des installierten Debian Pakets "coreutils" mit "man" an. -.TP +.TP debmany 3dchess -Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download. -.TP +Zeigt alle Manpages des Paketes "3dchess" mit "man" an. Da es noch nicht installiert ist wird es vom Repository bezogen \- wenn nötig auch per Download. +.TP debmany test.deb Zeigt alle Manpages des lokalen Debian Paketes "./test.deb" mit "man" an. -.TP +.TP debmany \-k sc Benutzt den bevorzugten Manviewer (für KDE Anwender) -.TP +.TP debmany \-g sc Benutzt den bevorzugten Manviewer (für GNOME Anwender) -.TP +.TP debmany \-x sc Benutzt den bevorzugten Manviewer (für KDE/GNOME/Xfce Anwender) -.TP +.TP debmany \-z \-k Benutzt "zenity" um Dateien auszuwählen und Paketnamen einzugeben. -.TP +.TP TMPDIR=~/tmp debmany \-m 'konqueror man:%s' sc Benutzt ~/tmp als temporären Ordner und Konqueror als Viewer -.TP +.TP alias debmany='debmany \-l de \-L 5M \-k'; debmany \-m man \-l "zh*" foo Setzte einen Alias um die bevorzugten Optionen festzulegen. Diese können, wie man sieht, jederzeit überschrieben werden. -.TP +.TP vi /usr/local/bin/ask # nach dem Speichern: chmod 755 ask #!/bin/dash -.br +.br read \-p "Programm zum Öffnen: " pgm -.br +.br eval $pgm "$1" -.br +.br -.br +.br debmany \-o ask -.br +.br Beim Öffnen einer Datei aus usr/share/doc wird man nach dem Programm, mit dem man sie öffnen möchte, gefragt. .SH "AUTOR" Geschrieben von Michael Arlt. diff --git a/debpaste b/debpaste index c6178f1..dae558f 100755 --- a/debpaste +++ b/debpaste @@ -5,21 +5,21 @@ debpaste - http://paste.debian.net/ XML-RPC client -=cut +=cut # Author: Hanno Hecker # Licence: AGPL 3.0 (http://www.fsf.org/licensing/licenses/agpl-3.0.html) # Version: $Id: debpaste 22 2009-11-19 17:23:47Z vetinari $ # SVN: http://svn.ankh-morp.org:8080/tools/paste-dn/ -# -# Required: -# deb: perl-base perl-modules +# +# Required: +# deb: perl-base perl-modules # libtimedate-perl libfrontier-rpc-perl libtext-iconv-perl # -# ToDo: +# ToDo: # * "get" formatting? # * wishlist :) -# +# use strict; use Getopt::Long; use Pod::Usage; @@ -43,11 +43,11 @@ Your paste infos are saved to I<~/.debpaste.history> -=item del +=item del Usage: debpaste del [OPTIONS] ID -Deletes paste with id ID. This must be an ID which you have pasted before +Deletes paste with id ID. This must be an ID which you have pasted before (and is in your history file) =item get @@ -63,7 +63,7 @@ Usage: debpaste lang [OPTIONS] -Dumps the list of available languages for syntax highlighting, use the +Dumps the list of available languages for syntax highlighting, use the B<--lang=LANG> option when Bing a paste. =item edit @@ -77,16 +77,16 @@ Usage: debpaste expire [OPTIONS] [ID] -Removes the entry ID from history file. If no ID is given it removes all +Removes the entry ID from history file. If no ID is given it removes all entries which are expired. -=back - -=head1 OPTIONS +=back + +=head1 OPTIONS =over 4 -=item --user=USERNAME +=item --user=USERNAME paste as USERNAME instead of C @@ -102,7 +102,7 @@ use LANG for syntax highlight ('debpaste lang' for available languages) -=item --expires=SEC +=item --expires=SEC expires in SEC seconds (default: 259200 = 72h) @@ -110,7 +110,7 @@ when adding new paste, use ENC as encoding of file, default: UTF-8 -=item --noheader +=item --noheader when Bting entries, don't print header, just dump the paste to stdout. @@ -135,7 +135,7 @@ The right place for setting default options like the username or expire values. Format is C, example: - + User: Vetinari Expires: 86400 @@ -159,7 +159,7 @@ server => "http://paste.debian.net/server.pl", user => "anonymous", lang => "", - expires => 86400 * 3, # + expires => 86400 * 3, # history_file => $history, no_get_header => 0, ); @@ -182,7 +182,7 @@ ." pasted before (and is in your history file)\n", 'lang' => "\n" ."Usage: $0 lang [OPTIONS]\n" - ." Dumps the list of available languages for syntax highlighting\n", + ." Dumps the list of available languages for syntax highlighting\n", 'edit' => "\n" ."Usage: $0 edit [OPTIONS] ID\n" ." Downloads the paste with id ID, spawns an editor (\$EDITOR)\n" @@ -267,8 +267,8 @@ $self->{$_} = $args{$_}; } unless (exists $self->{editor}) { - $self->{editor} = $ENV{EDITOR} ? - $ENV{EDITOR} : ($ENV{VISUAL} ? + $self->{editor} = $ENV{EDITOR} ? + $ENV{EDITOR} : ($ENV{VISUAL} ? $ENV{VISUAL} : "/usr/bin/editor"); } $self->{encoding} = "UTF-8" unless $self->{encoding}; @@ -321,7 +321,7 @@ # FIXME: probably only works with paste.d.n's timezone: my $stime = str2time($rc->{submitdate}, "CET") - 3600; my $sub_date = strftime('%Y-%m-%d %H:%M:%S', localtime $stime); - my $exp_date = strftime('%Y-%m-%d %H:%M:%S', + my $exp_date = strftime('%Y-%m-%d %H:%M:%S', localtime($stime + $rc->{expiredate})); unless ($self->{no_get_header}) { print "User: ", $rc->{submitter}, "\n", @@ -369,7 +369,7 @@ close $fh or $self->_error("Failed to close tempfile: $!"); if (system($self->{editor}, $self->{_tempfile}) != 0) { - $self->_error("failed to execute: $!") + $self->_error("failed to execute: $!") if $? == -1; $self->_error(sprintf('child died with signal %d, %s coredump', @@ -381,9 +381,9 @@ open FH, $self->{_tempfile} or $self->_error("Failed to open temp file: $!"); - { - local $/ = undef; - $txt = ; + { + local $/ = undef; + $txt = ; }; close FH; unlink $self->{_tempfile}; @@ -398,8 +398,8 @@ die "$0: no id given\n" unless $id; open FILE, $self->{history_file} or die "$0: failed to open history file: $!\n"; - { - local $/ = "\n\n"; + { + local $/ = "\n\n"; while () { s#^[\n\s]+##ms; s#[\n\s]+$##ms; @@ -435,7 +435,7 @@ my @ids = (); open FILE, $self->{history_file} or return; - { + { local $/ = "\n\n"; while () { s#^[\n\s]+##ms; @@ -459,7 +459,7 @@ } } close FILE; - open FILE, ">", $self->{history_file} + open FILE, ">", $self->{history_file} or die "$0: Failed to open history file: $!\n"; foreach my $h (@history) { foreach (keys %{$h}) { @@ -469,7 +469,7 @@ print FILE "\n"; } close FILE or die "$0: failed to write: $!\n"; - print "$0: expired ", scalar(@ids), " entries from history", + print "$0: expired ", scalar(@ids), " entries from history", (@ids ? ": ".join(", ", @ids) : ""), "\n"; } @@ -487,11 +487,11 @@ unless $code; $code = $self->_to_utf8($code); - my $rc = $self->{_service}->call("paste.addPaste", $code, - $self->{user}, - $self->{expires} - time, + my $rc = $self->{_service}->call("paste.addPaste", $code, + $self->{user}, + $self->{expires} - time, $self->{lang}); - die $rc->{statusmessage},"\n" + die $rc->{statusmessage},"\n" if $rc->{rc}; print $rc->{statusmessage},"\n"; print "To delete this entry, use: $0 del $rc->{id}\n"; @@ -516,7 +516,7 @@ =head1 DOWNLOAD -L or +L or L =head1 NOTES diff --git a/dglob b/dglob index 2e1cbb6..362573e 100755 --- a/dglob +++ b/dglob @@ -29,9 +29,9 @@ grep_dctrl_options="" all="no" -dglob_not() { -# List packages that are available but not installed - { dglob $* ; dglob -a $* ; } | sort | uniq -u ; +dglob_not() { +# List packages that are available but not installed + { dglob $* ; dglob -a $* ; } | sort | uniq -u ; } while true; do @@ -53,7 +53,7 @@ fi shift ;; - + --) shift ; break ;; esac done diff --git a/dgrep.pod b/dgrep.pod index 24021eb..1cd5208 100644 --- a/dgrep.pod +++ b/dgrep.pod @@ -14,7 +14,7 @@ packages. It passes the I argument(s) to L to retrieve a list of files -in those packages. You can use POSIX regular expressions for the package +in those packages. You can use POSIX regular expressions for the package names. If B is invoked as B, B or B then L, @@ -22,9 +22,9 @@ =head1 OPTIONS -B supports most of grep(1)'s options. Please refer to your +B supports most of grep(1)'s options. Please refer to your L documentation (i.e. the manpage or the texinfo manual) for -a complete listing. Only a few options are excluded because they do not +a complete listing. Only a few options are excluded because they do not conform with the intended behaviour, see the list below. =head2 Options of grep that are not supported by dgrep diff --git a/popbugs b/popbugs index 09d848e..08717f6 100755 --- a/popbugs +++ b/popbugs @@ -82,7 +82,7 @@ ''') sys.exit(1) - + if outputfile == None: fd, outputfile = tempfile.mkstemp(suffix='.html') output = os.fdopen(fd, 'w') @@ -112,7 +112,7 @@ if (fields[0] == 'POPULARITY-CONTEST-0' or fields[0] == 'END-POPULARITY-CONTEST-0'): continue - + (atime, ctime, package, pathname) = fields # if pathname == '' or pathname == '': # continue @@ -121,7 +121,7 @@ print("POPCON: Adding package " + package) packages[package] = Package(package,atime) pkglist.append(packages[package]) - + popcon.close() page = urllib.request.urlopen(bugurl).readlines() diff --git a/which-pkg-broke.1 b/which-pkg-broke.1 index 24f2b2f..32d633a 100644 --- a/which-pkg-broke.1 +++ b/which-pkg-broke.1 @@ -5,7 +5,7 @@ .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2, or (at your option) .\" any later version. -.\" +.\" .\" On Debian systems, a copy of the GNU General Public License version 2 .\" can be found in /usr/share/common-licenses/GPL-2. .TH which-pkg-broke 1 "July 24 2006" "debian\-goodies" "debian\-goodies"