[Pkg-zsh-commits] [zsh] 01/01: Rewrite bug script to have less code duplication and to also include debsums results
Axel Beckert
abe at deuxchevaux.org
Mon Jun 30 19:05:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch debian
in repository zsh.
commit e2803a7340f48be87d58ec93c858982078cbb829
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Mon Jun 30 20:52:57 2014 +0200
Rewrite bug script to have less code duplication and to also include debsums results
---
debian/zsh.bug-script | 37 +++++++++++++++++++++++++++----------
1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/debian/zsh.bug-script b/debian/zsh.bug-script
index 341fb16..5296c4e 100755
--- a/debian/zsh.bug-script
+++ b/debian/zsh.bug-script
@@ -3,20 +3,37 @@
exec 1>&3
exec 2>&3
+list_packages() {
+ text="$1"
+ shift
+ if [ -n "$1" ]; then
+ printf "$text:\n\n"
+ dpkg-query -l "$@"
+ if [ -x /usr/bin/debsums ]; then
+ FILES="$(debsums -ce "$@")"
+ if [ -n "$FILES" ]; then
+ printf "\nThe following files were modified:\n\n$FILES\n"
+ fi
+ fi
+ fi
+ printf "\n"
+}
+
if [ -x /usr/bin/aptitude ]; then
- echo "*** Packages which depend, recommend, suggest or enhance a zsh package and hence may provide code meant to be sourced in .zshrc ***"
- aptitude -q search '( ?enhances(?name(^zsh)) | ?depends(?name(^zsh)) | ?recommends(?name(^zsh)) | ?suggests(?name(^zsh)) ) !?source-package(^zsh$) ~i'
+ TEXT="Packages which depend, recommend, suggest or enhance a zsh package and hence may provide code meant to be sourced in .zshrc"
+ PKGS=$(aptitude -q -F '%p' search '( ?enhances(?name(^zsh)) | ?depends(?name(^zsh)) | ?recommends(?name(^zsh)) | ?suggests(?name(^zsh)) ) !?source-package(^zsh$) ~i')
else
- echo "*** Packages which provide code meant to be sourced in .zshrc ***"
+ TEXT="Packages which provide code meant to be sourced in .zshrc"
# Hardcoded list of (future) packages containing code meant to be
# sourced in .zshrc
- dpkg-query -l fizsh oh-my-zsh zsh-antigen autojump zec 'grml-*'
+ PKGS=$(dpkg-query -W -f '${Package}\n' fizsh oh-my-zsh zsh-antigen autojump zec 'grml-*' 2>/dev/null)
fi
-echo ""
-echo "*** Packages which provide vendor completions ***"
-dpkg-query -S /usr/share/zsh/vendor-completions/ | awk -F: '{print $1}' | sed -e 's/,//g' | xargs -r dpkg-query -l
+list_packages "$TEXT" $PKGS
+
+list_packages "Packages which provide vendor completions" \
+$(dpkg-query -S /usr/share/zsh/vendor-completions/ | awk -F: '{print $1}' | sed -e 's/,//g')
+
+list_packages "Packages which provide vendor functions" \
+$(dpkg-query -S /usr/share/zsh/vendor-functions/ | awk -F: '{print $1}' | sed -e 's/,//g')
-echo ""
-echo "*** Packages which provide vendor functions ***"
-dpkg-query -S /usr/share/zsh/vendor-functions/ | awk -F: '{print $1}' | sed -e 's/,//g' | xargs -r dpkg-query -l
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git
More information about the Pkg-zsh-commits
mailing list