Commit 6bdf7d70 authored by Seblu's avatar Seblu
Browse files

cleanpkgs: nice quit when no packages to remove

parent f70d8bec
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -16,4 +16,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

exec pacman -Rs $(pacman -Qqdt) $(pacman -Qqm) "$@"
declare -a pkgs=()
pkgs+=($(pacman -Qqdt))
pkgs+=($(pacman -Qqm))

(( ${#pkgs[*]} == 0 )) && exit 0
exec pacman -Rs "$@" "${pkgs[@]}"