Commit 54b6e87c authored by Vitaly Lipatov's avatar Vitaly Lipatov

addrepo/removerepo: add dry-run support

parent 22d78ade
......@@ -94,13 +94,13 @@ __epm_addrepo_altlinux()
assure_exists apt-repo
if tasknumber "$repo" >/dev/null ; then
sudocmd_foreach 'apt-repo add' $(tasknumber "$repo")
sudocmd_foreach "apt-repo $dryrun add" $(tasknumber "$repo")
return
fi
if [ -z "$repo" ] ; then
info "Add branch repo. Use follow params:"
sudocmd apt-repo add branch
sudocmd apt-repo $dryrun add branch
echo "etersoft - for LINUX@Etersoft repo"
echo "archive 2018/02/09 - for archive from that date"
return
......@@ -108,7 +108,7 @@ __epm_addrepo_altlinux()
# TODO: add other mirror (mirror.yandex.ru)
# TODO: apt-repo supports archive
sudocmd apt-repo add "$repo"
sudocmd apt-repo $dryrun add "$repo"
}
......
......@@ -24,7 +24,7 @@ __epm_removerepo_alt_grepremove()
{
local rp
epm repolist | grep -E "$1" | while read rp ; do
sudocmd apt-repo rm "$rp"
sudocmd apt-repo $dryrun rm "$rp"
done
}
......@@ -48,7 +48,7 @@ __epm_removerepo_alt()
info "remove autoimports repo"
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="autoimports.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")"
sudocmd apt-repo rm "$repo"
sudocmd apt-repo $dryrun rm "$repo"
;;
archive)
info "remove archive repos"
......@@ -63,7 +63,7 @@ __epm_removerepo_alt()
__epm_removerepo_alt_grepremove " repo/$1/"
;;
*)
sudocmd apt-repo rm "$*"
sudocmd apt-repo $dryrun rm "$*"
;;
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