b4b030c2305e0f2d6a422f3da148aad5f26342ae
[feisty_meow.git] / scripts / system / list_packages.sh
1 #!/bin/bash
2
3 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
4
5 if debian_like; then
6   dpkg -la | grep $*
7   exit $?
8 fi
9
10 rpm_available="$(which rpm)"
11 if [ ! -z "$rpm_available" ]; then
12 #is that the right phrase for rpm?  somewhat forgotten.
13   rpm -qa | grep $*
14   exit $?
15 fi
16
17 yum_available="$(which yum)"
18 if [ ! -z "$yum_available" ]; then
19   yum list | grep $*
20   exit $?
21 fi
22
23 echo "Could not deduce what type of OS this is; missing package listing commands."
24 exit 1