Commit bcbf3020 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce check_rsync, get_rsync_path and repos/rsync

parent 85b4ba40
# ALT Linux
git.alt sisyphus rsync.altlinux.org::ALTLinux/Sisyphus
git.alt 5.1 rsync.altlinux.org::ALTLinux/5.1/branch
git.alt 5.0 rsync.altlinux.org::ALTLinux/5.0/branch
git.alt 4.1 rsync.altlinux.org::ALTLinux/4.1/branch
git.alt 4.0 rsync.altlinux.org::ALTLinux/4.0/branch
# Etersoft
git.eter sisyphus rsync://rsync.etersoft.ru/pub/Etersoft/LINUX@Etersoft/Sisyphus
git.eter 5.1 rsync://rsync.etersoft.ru/pub/Etersoft/LINUX@Etersoft/5.1/branch
git.eter 5.0 rsync://rsync.etersoft.ru/pub/Etersoft/LINUX@Etersoft/5.0/branch
git.eter 4.1 rsync://rsync.etersoft.ru/pub/Etersoft/LINUX@Etersoft/4.1/branch
git.eter 4.0 rsync://rsync.etersoft.ru/pub/Etersoft/LINUX@Etersoft/4.0/branch
...@@ -7,3 +7,8 @@ get_git_url() ...@@ -7,3 +7,8 @@ get_git_url()
{ {
grep "^$1 " $ETERBUILDETC/repos/git | cut -f2 -d" " grep "^$1 " $ETERBUILDETC/repos/git | cut -f2 -d" "
} }
get_rsync_path()
{
grep "^$1 $2" $ETERBUILDETC/repos/rsync | cut -f3 -d" "
}
...@@ -7,6 +7,7 @@ which xdg-open 2>/dev/null >/dev/null && BROWSER=xdg-open ...@@ -7,6 +7,7 @@ which xdg-open 2>/dev/null >/dev/null && BROWSER=xdg-open
# (command from perl-libwww) # (command from perl-libwww)
which GET &>/dev/null && GET=GET || GET=false which GET &>/dev/null && GET=GET || GET=false
which rsync &>/dev/null && RSYNC=rsync || GET=false
download_url() download_url()
{ {
...@@ -19,3 +20,9 @@ check_url() ...@@ -19,3 +20,9 @@ check_url()
{ {
$GET -d "$1" $GET -d "$1"
} }
check_rsync()
{
[ -n "$1" ] || return 1
$RSYNC -n "$1" >/dev/null 2>&1
}
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
#load_mod spec
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$3' do not match with '$2'" || echo "OK for '$1' with '$2'"
}
for GEAR in git.alt git.eter ; do
for BRANCH in sisyphus 5.1 5.0 4.1 4.0 3.0 ; do
RSYNCPATH=$(get_rsync_path $GEAR $BRANCH)
echo
check_rsync $RSYNCPATH && echo "OK with $RSYNCPATH for $GEAR $BRANCH" || echo "FAILED with $RSYNCPATH for $GEAR $BRANCH"
done
done
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