contrib/pacsysclean: avoid setting bogus PACMAN_OPTS

PACMAN_OPTS would be erroneously set when it was undefined, causing
pacsysclean to error out.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2012-05-06 19:49:43 -04:00 committed by Dan McGee
parent 26abe8f600
commit 233e5f610c

View File

@ -27,7 +27,7 @@ IFS=$'\n'
name="^Name.*: (.*)$"
size="^Installed Size.*: (.*) KiB$"
[[ $PACMAN_OPTS != -* ]] && PACMAN_OPTS="-$PACMAN_OPTS"
[[ $PACMAN_OPTS && $PACMAN_OPTS != -* ]] && PACMAN_OPTS="-$PACMAN_OPTS"
for line in $(LANG=C pacman -Qi $PACMAN_OPTS); do
if [[ $line =~ $name ]]; then