aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-01 02:28:47 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-01 02:28:47 +0300
commit9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b (patch)
tree14219b98a0a659386b9743e7c74d7265a201513f /%HOME%
parentadd Ubuntu detection (diff)
downloadlinux-home-9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b.tar.gz
linux-home-9b6fb7049d66ee6eb0948c8d7b3cbb3d2fc91c4b.zip
list_packages: support Ubuntu
Diffstat (limited to '')
-rw-r--r--%HOME%/.bashrc13
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"