Annotation of /trunk/pkgtools/mirror-cvsd.sh
Parent Directory | Revision Log
Revision 610 -
(hide annotations)
(download)
(as text)
Sun Nov 11 23:40:52 2007 UTC (16 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 453 byte(s)
Sun Nov 11 23:40:52 2007 UTC (16 years, 11 months ago) by niro
File MIME type: application/x-sh
File size: 453 byte(s)
-added some pkgtools
1 | niro | 610 | #!/bin/bash |
2 | |||
3 | TARGET="$1" | ||
4 | TARGETDIR="$2" | ||
5 | |||
6 | if [[ -z ${TARGET} ]] | ||
7 | then | ||
8 | echo "No target ip or adress given." | ||
9 | exit 1 | ||
10 | fi | ||
11 | |||
12 | if [[ -z ${TARGETDIR} ]] | ||
13 | then | ||
14 | echo "No TARGETDIR (\$2) given. Using default '/var/www/magellan-mirror'!" | ||
15 | TARGETDIR=/var/www/magellan-mirror | ||
16 | fi | ||
17 | |||
18 | # sync all | ||
19 | rsync \ | ||
20 | --recursive \ | ||
21 | --times \ | ||
22 | --verbose \ | ||
23 | --rsh=ssh \ | ||
24 | --delete \ | ||
25 | /home/cvsd \ | ||
26 | ${TARGET}:${TARGETDIR}/ | ||
27 | |||
28 | # fix permissions | ||
29 | ssh ${TARGET} chmod -R a+rX,go-w ${TARGETDIR} |