diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-12-01 02:28:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-12-01 02:28:47 +0300 |
commit | 9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b (patch) | |
tree | 14219b98a0a659386b9743e7c74d7265a201513f /%HOME% | |
parent | add Ubuntu detection (diff) | |
download | linux-home-9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b.tar.gz linux-home-9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b.zip |
list_packages: support Ubuntu
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bashrc | 13 |
1 files changed, 12 insertions, 1 deletions
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" |