summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-20 17:00:26 -0600
committerDan McGee <dan@archlinux.org>2012-02-20 17:00:26 -0600
commit3849c3aec130601572b9e06b42bb6af5938936de (patch)
treef298f227f4ff591390e55b4f02812f12312dd5c7 /contrib
parent326c6a8eed60bfd6aa0d653dad722d8637022d68 (diff)
parent78adb71f20ee335dff49e34d33f04817a40002b6 (diff)
downloadpacman-3849c3aec130601572b9e06b42bb6af5938936de.tar.xz
Merge branch 'maint'
Conflicts: contrib/pacsysclean.in src/pacman/conf.h
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/pacsysclean.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/pacsysclean.in b/contrib/pacsysclean.in
index 17f7681b..162530ef 100755
--- a/contrib/pacsysclean.in
+++ b/contrib/pacsysclean.in
@@ -1,6 +1,6 @@
#!/bin/bash
-# pacsysclean - Sort installed packages by decreasing installed size. Useful for system clean-up.
+# pacsysclean - Sort installed packages by increasing installed size. Useful for system clean-up.
declare -r myname='pacsysclean'
declare -r myver='@PACKAGE_VERSION@'
@@ -8,7 +8,7 @@ declare -r myver='@PACKAGE_VERSION@'
PACMAN_OPTS=
usage() {
- echo "$myname - Sort installed packages by decreasing installed size."
+ echo "$myname - Sort installed packages by increasing installed size."
echo
echo "Usage: $myname [options]"
echo
@@ -35,6 +35,9 @@ fi
IFS=$'\n'
name="^Name.*: (.*)$"
size="^Installed Size.*: (.*) KiB$"
+
+[[ $PACMAN_OPTS != -* ]] && PACMAN_OPTS="-$PACMAN_OPTS"
+
for line in $(LANG=C pacman -Qi $PACMAN_OPTS); do
if [[ $line =~ $name ]]; then
printf "%s\t" ${BASH_REMATCH[1]}