epm-packages 1.19 KB
Newer Older
Danil Mikhailov's avatar
Danil Mikhailov committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/sh
#
# Copyright (C) 2012  Etersoft
# Copyright (C) 2012  Vitaly Lipatov <lav@etersoft.ru>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
#

Danil Mikhailov's avatar
Danil Mikhailov committed
21
epm_packages()
Danil Mikhailov's avatar
Danil Mikhailov committed
22 23
{

Vitaly Lipatov's avatar
Vitaly Lipatov committed
24 25
case $PMTYPE in
	apt-rpm)
26
		CMD="rpm -qa $pkg_filenames"
Danil Mikhailov's avatar
Danil Mikhailov committed
27
		;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
28
	apt-dpkg)
29
		CMD="dpkg -l $pkg_filenames"
Danil Mikhailov's avatar
Danil Mikhailov committed
30
		;;
31 32
	yum-rpm|urpm-rpm|zypper-rpm)
		CMD="rpm -qa $pkg_filenames"
Danil Mikhailov's avatar
Danil Mikhailov committed
33
		;;
34 35 36 37 38 39
	emerge)
		CMD="qlist -I"
		;;
	pkg_add)
		CMD="pkg_info"
		;;
40 41 42
	pacman)
		CMD="pacman -Qs"
		;;
43
	slackpkg)
44 45
		CMD="ls -1 /var/log/packages/"
		;;
Danil Mikhailov's avatar
Danil Mikhailov committed
46
	*)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
47
		fatal "Do not known query command for $PMTYPE"
Danil Mikhailov's avatar
Danil Mikhailov committed
48 49 50 51 52 53
		;;
esac

docmd $CMD

}