NBash

Форк
0
87 строк · 2.3 Кб
1
#!/bin/sh
2
#
3
# Copyright (C) 2012-2019  Etersoft
4
# Copyright (C) 2012-2019  Vitaly Lipatov <lav@etersoft.ru>
5
#
6
# This program is free software: you can redistribute it and/or modify
7
# it under the terms of the GNU Affero General Public License as published by
8
# the Free Software Foundation, either version 3 of the License, or
9
# (at your option) any later version.
10
#
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU Affero General Public License for more details.
15
#
16
# You should have received a copy of the GNU Affero General Public License
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
#
19

20
load_helper epm-check_updated_repo
21

22
epm_check()
23
{
24
update_repo_if_needed
25
local APTOPTIONS="$(subst_option non_interactive -y)"
26
local DNFOPTIONS="$(subst_option non_interactive -y) $(subst_option verbose --verbose) "
27
case $PMTYPE in
28
    apt-rpm)
29
        #sudocmd apt-get check || exit
30
        #sudocmd apt-get update || exit
31
        sudocmd apt-get -f $APTOPTIONS install || return
32
        info "You can use epm dedup also"
33
        ;;
34
    apt-dpkg)
35
        #sudocmd apt-get check || exit
36
        #sudocmd apt-get update || exit
37
        sudocmd apt-get -f $APTOPTIONS install || return
38
        ;;
39
    packagekit)
40
        docmd pkcon repair
41
        ;;
42
    aptitude-dpkg)
43
        sudocmd aptitude -f $APTOPTIONS install || return
44
        #sudocmd apt-get autoremove
45
        ;;
46
    yum-rpm)
47
        docmd yum check $DNFOPTIONS
48
        docmd package-cleanup --problems
49

50
        #docmd package-cleanup --dupes
51
        sudocmd package-cleanup --cleandupes
52

53
        docmd rpm -Va --nofiles --nodigest
54
        ;;
55
    dnf-rpm)
56
        sudocmd dnf check $DNFOPTIONS
57
        ;;
58
    emerge)
59
        sudocmd revdep-rebuild
60
        ;;
61
    #urpm-rpm)
62
    #    sudocmd urpme --auto-orphans
63
    #    ;;
64
    zypper-rpm)
65
        sudocmd zypper $(subst_option non_interactive --non-interactive) verify
66
        ;;
67
    conary)
68
        sudocmd conary verify
69
        ;;
70
    pkgng)
71
        sudocmd pkg check -d -a
72
        ;;
73
    homebrew)
74
        docmd brew doctor
75
        ;;
76
    xbps)
77
        sudocmd xbps-pkgdb -a
78
        ;;
79
    apk)
80
        sudocmd apk fix
81
        ;;
82
    *)
83
        fatal "Have no suitable command for $PMTYPE"
84
        ;;
85
esac
86

87
}
88

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.