diff options
-rw-r--r-- | %HOME%/.bashrc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 730a7ea..d6eb5a6 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -62,18 +62,31 @@ alias tree='tree -a' alias cls='echo -en "\ec"' +list_packages_cygwin() ( + set -o errexit -o nounset -o pipefail + + cygcheck --check-setup --dump-only \ + | cut -d ' ' -f 1 +) + +list_packages_ubuntu() ( + set -o errexit -o nounset -o pipefail + + dpkg --get-selections \ + | grep --invert-match -- 'deinstall$' \ + | cut -f 1 \ + | cut -d ':' -f 1 +) + list_packages() ( set -o errexit -o nounset -o pipefail if is_cygwin; then - cygcheck --check-setup --dump-only \ - | cut -d ' ' -f 1 + list_packages_cygwin elif is_ubuntu; then - dpkg --get-selections \ - | grep --invert-match -- 'deinstall$' \ - | cut -f 1 \ - | cut -d ':' -f 1 + list_packages_ubuntu fi + return 1 ) [ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" |