Skip to content
Snippets Groups Projects
Commit 6bdf7d70 authored by Seblu's avatar Seblu
Browse files

cleanpkgs: nice quit when no packages to remove

parent f70d8bec
No related branches found
No related tags found
No related merge requests found
Pipeline #422 failed with stages
in 5 minutes and 9 seconds
......@@ -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[@]}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment