Commit faed782f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-removerepo: check for ^rpm (full string)

parent 6f2789f1
...@@ -23,11 +23,12 @@ load_helper epm-sh-altlinux ...@@ -23,11 +23,12 @@ load_helper epm-sh-altlinux
__epm_removerepo_alt_grepremove() __epm_removerepo_alt_grepremove()
{ {
local rl local rl
if [ "$1" != "all" ] ; then # ^rpm means full string
if [ "$1" = "all" ] || rhas "$1" "^rpm" ; then
rl="$1"
else
rl="$((quiet=1 epm repolist) 2>/dev/null | grep -E "$1")" rl="$((quiet=1 epm repolist) 2>/dev/null | grep -E "$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
else
rl="$1"
fi fi
echo "$rl" | while read rp ; do echo "$rl" | while read rp ; do
# TODO: print removed lines # TODO: print removed lines
......
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