Commit b804c077 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add is_abs_path and use it

parent d9a273f3
......@@ -118,7 +118,7 @@ update_alt_contents_index()
(quiet=1 epm_repolist) | grep -v " task$" | grep -E "rpm.*(ftp://|http://|https://|rsync://|file:/)" | sed -e "s@^rpm.*\(ftp://\|http://\|https://\)@rsync://@g" | sed -e "s@^rpm.*\(file:\)@@g" | while read -r URL1 URL2 component ; do
[ "$component" = "debuginfo" ] && continue
URL="$URL1/$URL2"
if echo "$URL" | grep -q "^/" ; then
if is_abs_path "$URL" ; then
# first check for local mirror
local LOCALPATH="$(echo "$URL/base")"
local LOCALPATHGZIP="$(echo "$LOCALPATH" | sed -e "s|/ALTLinux/|/ALTLinux/contents_index/|")"
......
......@@ -997,7 +997,10 @@ subst()
}
fi
is_abs_path()
{
echo "$1" | grep -q "^/"
}
check_core_commands()
{
......
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