summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-18 16:33:45 +0200
committerDan McGee <dan@archlinux.org>2011-07-18 17:35:12 +0200
commit3934a842b8121d6fe950fcac323e92e5e35f1538 (patch)
tree2538e1f7ddd5e93e9f4a7bc6a0c77a66719e16dd /contrib
parent3294039a00f3aa65181ed23518dc5c73e0201268 (diff)
downloadpacman-3934a842b8121d6fe950fcac323e92e5e35f1538.tar.gz
pacman-3934a842b8121d6fe950fcac323e92e5e35f1538.tar.xz
contrib/paclog-pkglist: whitespace cleanup
add a modeline and change 2 space indent to a tab. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/paclog-pkglist.in50
1 files changed, 25 insertions, 25 deletions
diff --git a/contrib/paclog-pkglist.in b/contrib/paclog-pkglist.in
index 4cf5e341..27dfd302 100755
--- a/contrib/paclog-pkglist.in
+++ b/contrib/paclog-pkglist.in
@@ -22,47 +22,47 @@ export TEXTDOMAINDIR='/usr/share/locale'
declare logfile=${1:-@localstatedir@/log/pacman.log}
if [[ $1 ]]; then
- if [[ $1 = -@(h|-help) ]]; then
- printf 'usage: %s [pacman log]\n' "${0##*/}"
- printf 'example: %s @localstatedir@/log/pacman.log\n' "${0##*/}"
- printf '\ndefaults to: @localstatedir@/log/pacman.log\n'
- exit 0
- elif [[ ! -e $logfile ]]; then
- printf $"target not found: %s\n" "$1"
- exit 1
- fi
+ if [[ $1 = -@(h|-help) ]]; then
+ printf 'usage: %s [pacman log]\n' "${0##*/}"
+ printf 'example: %s @localstatedir@/log/pacman.log\n' "${0##*/}"
+ printf '\ndefaults to: @localstatedir@/log/pacman.log\n'
+ exit 0
+ elif [[ ! -e $logfile ]]; then
+ printf $"target not found: %s\n" "$1"
+ exit 1
+ fi
fi
<"$logfile" awk '
{
- action = $3
- pkgname = $4
- pkgver = $5
- upgver = $7
+ action = $3
+ pkgname = $4
+ pkgver = $5
+ upgver = $7
}
NF == 5 && action == "installed" {
- gsub(/[()]/, "", pkgver)
- pkg[pkgname] = pkgver
- next
+ gsub(/[()]/, "", pkgver)
+ pkg[pkgname] = pkgver
+ next
}
NF == 7 && action == "upgraded" {
- sub(/\)/, "", upgver)
- pkg[pkgname] = upgver
- next
+ sub(/\)/, "", upgver)
+ pkg[pkgname] = upgver
+ next
}
NF == 5 && action == "removed" {
- pkg[pkgname] = -1
+ pkg[pkgname] = -1
}
END {
- for (i in pkg) {
- if (pkg[i] != -1) {
- printf "%s %s\n",i,pkg[i]
- }
- }
+ for (i in pkg) {
+ if (pkg[i] != -1) {
+ printf "%s %s\n",i,pkg[i]
+ }
+ }
}' | sort
# vim: set ts=2 sw=2 noet: