aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-16 02:44:50 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-16 02:44:50 +0300
commit90929c626c45f9b57ce27150158b4e209ebb6705 (patch)
treefba8dfeb87bd9585343d131ff506b533b77ac9c0 /%HOME%
parentos.sh: add corresponding functions for Arch Linux (diff)
downloadlinux-home-90929c626c45f9b57ce27150158b4e209ebb6705.tar.gz
linux-home-90929c626c45f9b57ce27150158b4e209ebb6705.zip
code style
Diffstat (limited to '')
-rw-r--r--%HOME%/.bash_utils/os.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/%HOME%/.bash_utils/os.sh b/%HOME%/.bash_utils/os.sh
index 5f4f181..640c693 100644
--- a/%HOME%/.bash_utils/os.sh
+++ b/%HOME%/.bash_utils/os.sh
@@ -43,7 +43,9 @@ list_packages_cygwin() (
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 \
@@ -68,12 +70,15 @@ list_packages_ubuntu() (
list_initial_packages_arch() (
set -o errexit -o nounset -o pipefail
+
local -ra groups=(base base-devel)
+
pacman -Q --groups -q -- ${groups[@]+"${groups[@]}"} | sort
)
list_manually_installed_packages_arch() (
set -o errexit -o nounset -o pipefail
+
comm -23 <( pacman -Q --explicit -q | sort ) \
<( list_initial_packages_arch )
)