epm-clean 1.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/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.
#

epm_clean()
{
case $DISTRNAME in
	"ALTLinux"|"Ubuntu"|"Debian"|"PCLinux")
Vitaly Lipatov's avatar
Vitaly Lipatov committed
25
		docmd $SUDO apt-get clean
26 27
		;;
	"LinuxXP"|"Fedora"|"ASPLinux"|"CentOS"|"RHEL"|"Scientific")
Vitaly Lipatov's avatar
Vitaly Lipatov committed
28 29
		docmd $SUDO yum clean all
		docmd $SUDO yum makecache
30 31
		;;
	"Mandriva")
Vitaly Lipatov's avatar
Vitaly Lipatov committed
32
		docmd $SUDO urpmi --clean
33 34
		;;
	"SUSE")
Vitaly Lipatov's avatar
Vitaly Lipatov committed
35
		docmd $SUDO zypper clean
36 37
		;;
	*)
Vitaly Lipatov's avatar
Vitaly Lipatov committed
38
		fatal "Do not known command for $PMTYPE"
39 40 41 42
		;;
esac

}