From 9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 1 Dec 2016 02:28:47 +0300 Subject: list_packages: support Ubuntu --- %HOME%/.bashrc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 623146c..7968258 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -62,7 +62,18 @@ alias tree='tree -a' alias cls='echo -en "\ec"' -is_cygwin && alias list_packages='cygcheck -cd' +list_packages() ( + set -o errexit -o nounset -o pipefail + + if is_cygwin; then + cygcheck --check-setup --dump-only + elif is_ubuntu; then + dpkg --get-selections \ + | grep --invert-match -- 'deinstall$' \ + | cut -f 1 \ + | cut -d ':' -f 1 + fi +) [ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" [ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" -- cgit v1.2.3