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