diff options
author | Eric Bélanger <snowmaniscool@gmail.com> | 2012-02-16 00:56:29 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-02-16 17:30:24 -0600 |
commit | 242006933d31c88b844f8f8d0c2f0806763cc51f (patch) | |
tree | 54ccc0e5d20f8cec98ce767e8098f4792647e2a0 | |
parent | 85712814cdbfa301e5827fafd6bfb8ac0886079c (diff) | |
download | pacman-242006933d31c88b844f8f8d0c2f0806763cc51f.tar.xz |
pacsysclean: Fix script description and accept -o option without hyphen
Close FS#28434
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rwxr-xr-x | contrib/pacsysclean.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/pacsysclean.in b/contrib/pacsysclean.in index c87082e0..a4accd56 100755 --- a/contrib/pacsysclean.in +++ b/contrib/pacsysclean.in @@ -1,11 +1,11 @@ #!/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. PACMAN_OPTS= usage() { - echo "pacsysclean - Sort installed packages by decreasing installed size." + echo "pacsysclean - Sort installed packages by increasing installed size." echo echo "Usage: pacsysclean [options]" echo @@ -26,6 +26,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]} |