/etckeeper/list-installed.d/50list-installed
http://github.com/brinkman83/bashrc · Shell · 10 lines · 6 code · 0 blank · 4 comment · 1 complexity · a109b32e05c3a2e2490c096399675abc MD5 · raw file
- #!/bin/sh
- # Output to stdout a *sorted* list of all currently installed
- # (or removed but still with config-files) packages, in the
- # format "package version\n" (or something similar).
- if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then
- dpkg-query -W -f '${Status}\t${Package} ${Version}\n' | \
- egrep '(ok installed|ok config-files)' | cut -f2,3
- elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then
- rpm -qa --queryformat "%{name} %{version} %{arch}\n" | sort
- fi