Commit 616bb37d authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repolist: fix repo list return code

parent c8ac5776
......@@ -64,11 +64,13 @@ __print_apt_sources_list_verbose()
local regexp="$1"
shift
local i
local res=1
for i in $@ ; do
test -r "$i" || continue
grep -v -- "^.*#" $i | grep -v -- "^ *\$" | grep -q . && __info_cyan "$i:" || continue
grep -v -- "^.*#" $i | grep -v -- "^ *\$" | sed -e 's|^| |' | grep -E --color "$regexp"
grep -v -- "^.*#" $i | grep -v -- "^ *\$" | sed -e 's|^| |' | grep -E --color "$regexp" && res=0
done
return $res
}
__print_apt_sources_list_verbose_full()
......@@ -76,11 +78,13 @@ __print_apt_sources_list_verbose_full()
local regexp="$1"
shift
local i
local res=1
for i in $@ ; do
test -r "$i" || continue
grep -- "^[[:space:]]*#*[[:space:]]*rpm" $i | grep -v -- "^ *\$" | grep -q . && echo && __info_cyan "$i:" || continue
grep -- "^[[:space:]]*#*[[:space:]]*rpm" $i | grep -v -- "^ *\$" | sed -e 's|^| |' -e "s|\(.*#.*\)|$(set_color $WHITE)\1$(restore_color)|" | grep -E --color "$regexp"
grep -- "^[[:space:]]*#*[[:space:]]*rpm" $i | grep -v -- "^ *\$" | sed -e 's|^| |' -e "s|\(.*#.*\)|$(set_color $WHITE)\1$(restore_color)|" | grep -E --color "$regexp" && res=0
done
return $res
}
print_apt_sources_list()
......
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