My omnium-gatherom of scripts and source code.
at main 8 lines 273 B view raw
1#!/usr/bin/env bash 2#Prints packages that are not dependent on any other package 3IFS=$'\n' read -rd '' -a pkgs < <( pacman -Q|cut -d' ' -f1 && printf '\0' ) 4 5for i in "${pkgs[@]}"; do 6 pkg_count=$(pactree -r "$i"|wc -l) 7 [ "$pkg_count" = 1 ]&&echo "$i">>pkglist 8done