Commit 7f4f41f1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rsync_all.sh: improve

parent 8fcdf43f
......@@ -23,7 +23,8 @@ get_rsync_path()
local RSYNCPATH
if [ "$1" = "c6/branch" ] ; then
RSYNCPATH=rsync.altlinux.ru::ALTLinux
elif echo "$1" | grep -q "p8/" ; then
#elif echo "$1" | grep -q "p8/" ; then
elif false ; then
#RSYNCPATH=rsync://ftp.basealt.ru/pub/distributions/ALTLinux
RSYNCPATH=rsync://ftp.basealt.ru/ALTLinux
......@@ -37,7 +38,7 @@ RPMS=/var/ftp/pub/ALTLinux
TIMEOUT=5000
LISTARCH="i586 x86_64 x86_64-i586 noarch"
DELETE="--delete-after --delete-excluded"
DELETE="--delete-after --delete-excluded --max-delete=1000"
func()
{
......@@ -48,7 +49,7 @@ echo "Start sync from $RSYNCPATH/$1 to $RPMS/$1"
# sync only if main dir is exist
test -d "$RPMS/${1/\/*/}" || return 0
mkdir -p $RPMS/$1/
rsync $DELETE --fuzzy --partial --timeout=$TIMEOUT --progress --stats -vbrlt --copy-links \
rsync $DELETE --fuzzy --partial --inplace --timeout=$TIMEOUT --progress --stats -vrlt --copy-links \
--exclude "*SRPMS*" $2 \
$RSYNCPATH/$1/ $RPMS/$1/
RES=$?
......@@ -65,7 +66,7 @@ sync_file()
RSYNCPATH=$(get_rsync_path $1)
echo
echo "Start sync from $RSYNCPATH/$1 to $RPMS/$1"
rsync $DELETE --fuzzy --partial --timeout=$TIMEOUT --progress --stats -vbrlt --copy-links \
rsync $DELETE --fuzzy --partial --timeout=$TIMEOUT --progress --stats -vrlt --copy-links \
--exclude "*SRPMS*" \
$RSYNCPATH/$1 $RPMS/$1
}
......@@ -118,7 +119,7 @@ elif [ "$1" = "--file" ] ; then
sync_file $1
exit
elif echo "$1" | grep -q branch ; then
sync_branches $1/branch
sync_branches $1
exit
elif [ -n "$1" ] ; then
sync_other $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