Commit 3d377fb8 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: intoduce autoremove command

parent 1ed0d94d
......@@ -114,6 +114,9 @@ check_command()
-e|-P|remove|delete) # HELPCMD: remove (delete) package(s) from the database and the system
epm_cmd=remove
;;
autoremove) # HELPCMD: auto remove unneeded package(s)
epm_cmd=autoremove
;;
-qi|info|show) # HELPCMD: print package detail info
epm_cmd=info
;;
......
#!/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_autoclean()
{
case $PMTYPE in
#apt-rpm)
# sudocmd apt-get autoclean
# ;;
apt-dpkg)
sudocmd apt-get autoclean
;;
#yum-rpm)
# sudocmd yum clean all
# ;;
#urpm-rpm)
# sudocmd urpmi --clean
# ;;
#zypper-rpm)
# sudocmd zypper clean
# ;;
*)
fatal "Do not known command for $PMTYPE"
;;
esac
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment