Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
7f4f41f1
Commit
7f4f41f1
authored
Jun 27, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsync_all.sh: improve
parent
8fcdf43f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
rsync_all.sh
etersoft/rsync_all.sh
+6
-5
No files found.
etersoft/rsync_all.sh
View file @
7f4f41f1
...
@@ -23,7 +23,8 @@ get_rsync_path()
...
@@ -23,7 +23,8 @@ get_rsync_path()
local
RSYNCPATH
local
RSYNCPATH
if
[
"
$1
"
=
"c6/branch"
]
;
then
if
[
"
$1
"
=
"c6/branch"
]
;
then
RSYNCPATH
=
rsync.altlinux.ru::ALTLinux
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/pub/distributions/ALTLinux
RSYNCPATH
=
rsync://ftp.basealt.ru/ALTLinux
RSYNCPATH
=
rsync://ftp.basealt.ru/ALTLinux
...
@@ -37,7 +38,7 @@ RPMS=/var/ftp/pub/ALTLinux
...
@@ -37,7 +38,7 @@ RPMS=/var/ftp/pub/ALTLinux
TIMEOUT
=
5000
TIMEOUT
=
5000
LISTARCH
=
"i586 x86_64 x86_64-i586 noarch"
LISTARCH
=
"i586 x86_64 x86_64-i586 noarch"
DELETE
=
"--delete-after --delete-excluded"
DELETE
=
"--delete-after --delete-excluded
--max-delete=1000
"
func
()
func
()
{
{
...
@@ -48,7 +49,7 @@ echo "Start sync from $RSYNCPATH/$1 to $RPMS/$1"
...
@@ -48,7 +49,7 @@ echo "Start sync from $RSYNCPATH/$1 to $RPMS/$1"
# sync only if main dir is exist
# sync only if main dir is exist
test
-d
"
$RPMS
/
${
1
/\/*/
}
"
||
return
0
test
-d
"
$RPMS
/
${
1
/\/*/
}
"
||
return
0
mkdir
-p
$RPMS
/
$1
/
mkdir
-p
$RPMS
/
$1
/
rsync
$DELETE
--fuzzy
--partial
--
timeout
=
$TIMEOUT
--progress
--stats
-vb
rlt
--copy-links
\
rsync
$DELETE
--fuzzy
--partial
--
inplace
--timeout
=
$TIMEOUT
--progress
--stats
-v
rlt
--copy-links
\
--exclude
"*SRPMS*"
$2
\
--exclude
"*SRPMS*"
$2
\
$RSYNCPATH
/
$1
/
$RPMS
/
$1
/
$RSYNCPATH
/
$1
/
$RPMS
/
$1
/
RES
=
$?
RES
=
$?
...
@@ -65,7 +66,7 @@ sync_file()
...
@@ -65,7 +66,7 @@ sync_file()
RSYNCPATH
=
$(
get_rsync_path
$1
)
RSYNCPATH
=
$(
get_rsync_path
$1
)
echo
echo
echo
"Start sync from
$RSYNCPATH
/
$1
to
$RPMS
/
$1
"
echo
"Start sync from
$RSYNCPATH
/
$1
to
$RPMS
/
$1
"
rsync
$DELETE
--fuzzy
--partial
--timeout
=
$TIMEOUT
--progress
--stats
-v
b
rlt
--copy-links
\
rsync
$DELETE
--fuzzy
--partial
--timeout
=
$TIMEOUT
--progress
--stats
-vrlt
--copy-links
\
--exclude
"*SRPMS*"
\
--exclude
"*SRPMS*"
\
$RSYNCPATH
/
$1
$RPMS
/
$1
$RSYNCPATH
/
$1
$RPMS
/
$1
}
}
...
@@ -118,7 +119,7 @@ elif [ "$1" = "--file" ] ; then
...
@@ -118,7 +119,7 @@ elif [ "$1" = "--file" ] ; then
sync_file
$1
sync_file
$1
exit
exit
elif
echo
"
$1
"
|
grep
-q
branch
;
then
elif
echo
"
$1
"
|
grep
-q
branch
;
then
sync_branches
$1
/branch
sync_branches
$1
exit
exit
elif
[
-n
"
$1
"
]
;
then
elif
[
-n
"
$1
"
]
;
then
sync_other
$1
sync_other
$1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment