epm-removerepo 1.38 KB
Newer Older
1 2 3 4 5
#!/bin/sh
#
# Copyright (C) 2012  Etersoft
# Copyright (C) 2012  Vitaly Lipatov <lav@etersoft.ru>
#
6 7 8
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
9 10 11 12 13
# (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
14
# GNU Affero General Public License for more details.
15
#
16 17
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18 19 20 21 22
#

epm_removerepo()
{
case $PMTYPE in
23
	apt-rpm)
24
		sudocmd apt-repo rm $pkg_filenames
25 26
		;;
	apt-dpkg)
27 28 29 30 31 32
		echo "You need remove repo from /etc/apt/sources.list"
		;;
	yum-rpm)
		echo "You need remove repo from /etc/yum.repos.d/"
		;;
	urpm-rpm)
33
		sudocmd urpmi.removemedia $pkg_filenames
34
		;;
35
	zypper-rpm)
36
		sudocmd zypper removerepo $pkg_filenames
37 38
		;;
	emerge)
39
		sudocmd layman -d$pkg_filenames
40 41 42 43
		;;
	pacman)
		echo "You need remove repo from /etc/pacman.conf"
		;;
44 45 46
	npackd)
		docmd npackdcl remove-repo --url=$pkg_filenames
		;;
47
	slackpkg)
48
		echo "You need remove repo from /etc/slackpkg/mirrors"
49 50 51 52 53 54 55
		;;
	*)
		fatal "Do not known command for $PMTYPE"
		;;
esac

}