From bbd3febcd0852a61ace9637a294617b83eb2f4f7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 15 Jan 2017 23:48:26 +0300 Subject: add list_initial_packages_ubuntu --- %HOME%/.bash_utils/os.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '%HOME%') 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() ( -- cgit v1.2.3