summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorEric Bélanger <snowmaniscool@gmail.com>2012-02-16 06:56:29 +0100
committerDan McGee <dan@archlinux.org>2012-02-17 00:30:24 +0100
commit242006933d31c88b844f8f8d0c2f0806763cc51f (patch)
tree54ccc0e5d20f8cec98ce767e8098f4792647e2a0 /contrib
parent85712814cdbfa301e5827fafd6bfb8ac0886079c (diff)
downloadpacman-242006933d31c88b844f8f8d0c2f0806763cc51f.tar.gz
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>
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 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]}