diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-15 23:48:26 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-01-15 23:48:26 +0300 |
commit | bbd3febcd0852a61ace9637a294617b83eb2f4f7 (patch) | |
tree | 1987c2f4049cb903460fbb71422bd047aa7e336c /%HOME%/.bash_utils | |
parent | bugfix (diff) | |
download | linux-home-bbd3febcd0852a61ace9637a294617b83eb2f4f7.tar.gz linux-home-bbd3febcd0852a61ace9637a294617b83eb2f4f7.zip |
add list_initial_packages_ubuntu
Diffstat (limited to '')
-rw-r--r-- | %HOME%/.bash_utils/os.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/%HOME%/.bash_utils/os.sh b/%HOME%/.bash_utils/os.sh index faada73..5a49479 100644 --- a/%HOME%/.bash_utils/os.sh +++ b/%HOME%/.bash_utils/os.sh @@ -29,11 +29,20 @@ is_ubuntu() { test "$_os" == 'Ubuntu' } +list_initial_packages_ubuntu() ( + set -o errexit -o nounset -o pipefail + local -r initial_status='/var/log/installer/initial-status.gz' + gzip --decompress --stdout -- "$initial_status" \ + | sed --quiet -- 's/^Package: //p' \ + | sort \ + | uniq +) + list_manually_installed_packages_ubuntu() ( set -o errexit -o nounset -o pipefail comm -23 <( apt-mark showmanual | sort | uniq ) \ - <( gzip --decompress --stdout -- /var/log/installer/initial-status.gz | sed --quiet 's/^Package: //p' | sort | uniq ) + <( list_initial_packages_ubuntu ) ) list_packages_cygwin() ( |