diff options
Diffstat (limited to '%HOME%/.bash_utils')
-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() ( |