X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsystem%2Flist_packages.sh;fp=scripts%2Fsystem%2Flist_packages.sh;h=6b3222f18e9cffcc6ef1947d46f3fa1ff5d5a36a;hb=c041a073fe44baafa4ebcb516c7d377d52fff054;hp=0000000000000000000000000000000000000000;hpb=211fb16a38602f29a9722e33f34b5cacfbb9cfd6;p=feisty_meow.git diff --git a/scripts/system/list_packages.sh b/scripts/system/list_packages.sh new file mode 100644 index 00000000..6b3222f1 --- /dev/null +++ b/scripts/system/list_packages.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" + +if debian_like; then + dpkg -la | grep $* + exit $? +fi + +rpm_available="$(which rpm)" +if [ ! -z "$rpm_available" ]; then +#is that the right phrase for rpm? somewhat forgotten. + rpm -qa | grep $* + exit $? +fi + +yum_available="$(which yum)" +if [ ! -z "$yum_available" ]; then + yum list | grep $* + exit $? +fi + +echo "Could not deduce what type of OS this is; missing package listing commands." +exit 1