NBash

Форк
0
75 строк · 1.7 Кб
1
#!/bin/sh
2
#
3
# Copyright (C) 2015, 2022  Etersoft
4
# Copyright (C) 2015, 2022  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
# TODO: rpm list from bash_completion in /var/log/rpmpkgs
21

22
__alt_fix_triggers()
23
{
24
    local TDIR
25
    TDIR="$(mktemp -d)" || fatal
26
    remote_on_exit $TDIR
27
    assure_exists time
28
    touch $TDIR/added
29
    for ft in $(ls /usr/lib/rpm/*.filetrigger | sort) ; do
30
        echo "Try run $ft ..."
31
        echo $TDIR/added $TDIR/removed | a='' time $ft
32
    done
33
    rm -f $TDIR/added fatal
34
    rmdir $TDIR || fatal
35
    echo "Count lines:"
36
    wc -l /var/lib/rpm/files-awaiting-filetriggers
37
}
38

39
epm_checksystem_ALTLinux()
40
{
41
    fatal "Not yet implemented"
42
    #__alt_fix_triggers
43
}
44

45

46
epm_checksystem()
47
{
48

49
is_root && fatal "Do not use checksystem under root"
50

51
case $PMTYPE in
52
    homebrew)
53
        sudocmd brew doctor
54
        return
55
        ;;
56
esac
57

58
case $BASEDISTRNAME in
59
    "alt")
60
        epm_checksystem_$DISTRNAME
61
        ;;
62
    *)
63
        fatal "Have no suitable command for $PMTYPE"
64
        ;;
65
esac
66

67
}
68

69
# direct debug run
70
if [ "$1" = "--debug" ] ; then
71
    shift
72
    SUDO=sudo
73
    DISTRNAME=ALTLinux
74
    epm_checksystem
75
fi
76

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

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

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

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