epm-addrepo 1.49 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_addrepo()
{
case $PMTYPE in
23
	apt-rpm)
24
		assure_exists apt-repo
25
		sudocmd apt-repo add $pkg_filenames
26
		;;
Vitaly Lipatov's avatar
Vitaly Lipatov committed
27
	apt-dpkg|aptitude-dpkg)
28
		info "You need manually add repo to /etc/apt/sources.list"
29 30
		;;
	yum-rpm)
31
		info "You need manually add repo to /etc/yum.repos.d/"
32
		;;
33
	urpm-rpm)
34
		sudocmd urpmi.addmedia $pkg_filenames
35 36
		;;
	zypper-rpm)
37
		sudocmd zypper ar $pkg_filenames
38 39
		;;
	emerge)
40
		sudocmd layman -a $pkg_filenames
41 42
		;;
	pacman)
43
		info "You need manually add repo to /etc/pacman.conf"
44 45
		# Only for alone packages:
		#sudocmd repo-add $pkg_filenames
46
		;;
47
	npackd)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
48
		sudocmd npackdcl add-repo --url=$pkg_filenames
49
		;;
50
	slackpkg)
51
		info "You need manually add repo to /etc/slackpkg/mirrors"
52 53
		;;
	*)
54
		fatal "Have no suitable command for $PMTYPE"
55 56 57 58
		;;
esac

}