Commit 1c768dfd authored by Vitaly Lipatov's avatar Vitaly Lipatov

girar: add workaround against ALT bug #22745

parent a310f393
...@@ -3,17 +3,28 @@ ...@@ -3,17 +3,28 @@
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain # Public domain
load_mod repos
# Is allow connect with ssh to the GIRARHOST server? # Is allow connect with ssh to the GIRARHOST server?
has_ssh_girar_access() has_ssh_girar_access()
{ {
ssh $GIRARHOST help >/dev/null 2>&1 ssh $GIRARHOST help >/dev/null 2>&1
} }
check_http_status()
{
a= curl -s -I "$1" | grep HTTP | grep -q "200 OK"
}
# Returns true if repo with path from first arg is exits on the remote GIRARHOST server # Returns true if repo with path from first arg is exits on the remote GIRARHOST server
is_exist_git_repo() is_exist_git_repo()
{ {
ssh $GIRARHOST ls $1 >/dev/null 2>&1 if has_ssh_girar_access ; then
ssh $GIRARHOST ls $1 >/dev/null 2>&1 && return
fi
# TODO: this is workaround for ALT bug #22745
# https://bugzilla.altlinux.org/show_bug.cgi?id=22745
check_http_status $(get_git_url $GIRARHOST)/$1
} }
......
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