3
# Copyright (C) 2021 Etersoft
4
# Copyright (C) 2021 Vitaly Lipatov <lav@etersoft.ru>
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.
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.
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/>.
20
load_helper epm-sh-altlinux
24
get_help HELPCMD $SHAREDIR/epm-repo
30
epm repo add autoimports
32
epm repo change yandex
40
[ -n "$CMD" ] && shift
42
"-h"|"--help"|help) # HELPCMD: help
45
""|list) # HELPCMD: list enabled repositories (-a|--all for list disabled repositorires too)
46
load_helper epm-repolist
49
change) # HELPCMD: <mirror>: switch sources to the mirror (supports etersoft/yandex/basealt/altlinux.org/eterfund.org): rewrite URLs to the specified server
50
load_helper epm-repofix
53
set) # HELPCMD: <mirror>: remove all existing sources and add mirror for the branch
57
switch) # HELPCMD: switch repo to <repo>: rewrite URLs to the repo (but use epm release-upgrade [Sisyphus|p10] for upgrade to a next branch)
58
load_helper epm-repofix
61
enable) # HELPCMD: enable <repo>
62
load_helper epm-repoenable
65
disable) # HELPCMD: disable <repo>
66
load_helper epm-repodisable
69
addkey) # HELPCMD: add repository gpg key (by URL or file) (run with --help to detail)
70
load_helper epm-repo-addkey
73
clean) # HELPCMD: remove temp. repos (tasks and CD-ROMs)
74
[ "$BASEDISTRNAME" = "alt" ] || fatal "TODO: only ALT now is supported"
76
sudocmd apt-repo $dryrun clean
78
save) # HELPCMD: save sources lists to a temp place
79
load_helper epm-reposave
82
restore) # HELPCMD: restore sources lists from a temp place
83
load_helper epm-reposave
86
reset) # HELPCMD: reset repo lists to the distro default
87
load_helper epm-reposave
90
status) # HELPCMD: print repo status
91
load_helper epm-reposave
94
add) # HELPCMD: add package repo (etersoft, autoimports, archive 2017/01/31); run with param to get list
95
load_helper epm-addrepo
98
Add) # HELPCMD: like add, but do update after add
99
load_helper epm-addrepo
103
rm|del|remove) # HELPCMD: remove repository from the sources lists (epm repo remove all for all)
104
load_helper epm-removerepo
107
fix) # HELPCMD: fix paths in sources lists (ALT Linux only)
108
load_helper epm-repofix
112
# HELPCMD: PART: Local repo commands:
113
create) # HELPCMD: create (initialize) repo: [path] [name]
114
load_helper epm-repoindex
117
index) # HELPCMD: index repo (update indexes): [--init] [path] [name]
118
load_helper epm-repoindex
121
pkgadd) # HELPCMD: add to <dir> applied <package-filename1> [<package-filename2>...]
122
load_helper epm-repopkg
125
pkgupdate) # HELPCMD: replace in <dir> with new <package-filename1> [<package-filename2>...]
126
load_helper epm-repopkg
127
epm_repo_pkgupdate "$@"
129
pkgdel) # HELPCMD: del from <dir> <package1> [<package2>...]
130
load_helper epm-repopkg
134
fatal "Unknown command $ epm repo '$CMD'"