Commit 6cd9477e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repo remove: fixes for ALT

parent 2e3a17bb
......@@ -27,7 +27,7 @@ __epm_removerepo_alt_grepremove()
if [ "$1" = "all" ] || rhas "$1" "^rpm" ; then
rl="$1"
else
rl="$( epm --quiet repolist 2>/dev/null | grep -F "$1" | head -n1 )"
rl="$( epm --quiet repolist 2>/dev/null | grep -F "$1")"
[ -z "$rl" ] && warning "Can't find '$1' in the repos (see '# epm repolist' output)" && return 1
fi
echo "$rl" | while read rp ; do
......@@ -36,7 +36,7 @@ __epm_removerepo_alt_grepremove()
docmd apt-repo $dryrun rm "$rp"
continue
fi
if [ -n "$verbose" ] ; then
if [ -z "$quiet" ] ; then
sudocmd apt-repo $dryrun rm "$rp"
else
sudorun apt-repo $dryrun rm "$rp"
......@@ -59,11 +59,13 @@ __epm_removerepo_alt()
return
fi
local branch="$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")"
case "$1" in
autoimports)
info "remove autoimports repo"
[ -n "$DISTRVERSION" ] || fatal "Empty DISTRVERSION"
repo="autoimports.$(echo "$DISTRVERSION" | tr "[:upper:]" "[:lower:]")"
repo="autoimports.$branch"
sudocmd apt-repo $dryrun rm "$repo"
;;
archive)
......
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