diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-15 08:18:08 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-04-15 08:18:08 +0300 |
commit | eb94f002f3d409c9118a6c58a2df3121112bbf6b (patch) | |
tree | 93f607eb19fc2b6983229871a4be44290f49ba3e /%HOME%/.bash_utils | |
parent | swap_files: not necessarily regular (diff) | |
download | linux-home-eb94f002f3d409c9118a6c58a2df3121112bbf6b.tar.gz linux-home-eb94f002f3d409c9118a6c58a2df3121112bbf6b.zip |
os.sh: package_list -> pkg_list
Diffstat (limited to '%HOME%/.bash_utils')
-rw-r--r-- | %HOME%/.bash_utils/os.sh | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/%HOME%/.bash_utils/os.sh b/%HOME%/.bash_utils/os.sh index 193b272..785420b 100644 --- a/%HOME%/.bash_utils/os.sh +++ b/%HOME%/.bash_utils/os.sh @@ -38,7 +38,7 @@ os_is_arch() { test "$_os" == 'Arch Linux' } -packages_list_cygwin() ( +pkg_list_cygwin() ( set -o errexit -o nounset -o pipefail cygcheck --check-setup --dump-only \ @@ -46,25 +46,25 @@ packages_list_cygwin() ( | cut -d ' ' -f 1 ) -setup_packages_list_ubuntu() ( +setup_pkg_list_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 \ + | sed --quiet -- 's/^Package: //p' \ + | sort \ | uniq ) -user_packages_list_ubuntu() ( +user_pkg_list_ubuntu() ( set -o errexit -o nounset -o pipefail comm -23 <( apt-mark showmanual | sort | uniq ) \ - <( setup_packages_list_ubuntu ) + <( setup_pkg_list_ubuntu ) ) -packages_list_ubuntu() ( +pkg_list_ubuntu() ( set -o errexit -o nounset -o pipefail dpkg --get-selections \ @@ -73,7 +73,7 @@ packages_list_ubuntu() ( | cut -d ':' -f 1 ) -setup_packages_list_arch() ( +setup_pkg_list_arch() ( set -o errexit -o nounset -o pipefail local -ra groups=(base base-devel) @@ -81,26 +81,26 @@ setup_packages_list_arch() ( pacman -Q --groups -q -- ${groups[@]+"${groups[@]}"} | sort ) -user_packages_list_arch() ( +user_pkg_list_arch() ( set -o errexit -o nounset -o pipefail comm -23 <( pacman -Q --explicit -q | sort ) \ - <( setup_packages_list_arch ) + <( setup_pkg_list_arch ) ) -packages_list_arch() { +pkg_list_arch() { pacman -Qq } -packages_list() ( +pkg_list() ( set -o errexit -o nounset -o pipefail if os_is_cygwin; then - packages_list_cygwin + pkg_list_cygwin elif os_is_ubuntu; then - packages_list_ubuntu + pkg_list_ubuntu elif os_is_arch; then - packages_list_arch + pkg_list_arch else return 1 fi |