diff options
author | Joerg Jaspert <joerg@debian.org> | 2008-09-27 22:03:51 +0200 |
---|---|---|
committer | Joerg Jaspert <joerg@debian.org> | 2008-09-27 22:03:51 +0200 |
commit | f4eb4ab8a597a0241d78918d9a8dae58b1fe7dc9 (patch) | |
tree | 5d5686ed73211e3d469f9492288d6d64c3f220b8 | |
parent | 6276ad90b6466031941484d40f88a76618e8db61 (diff) |
Include a few suggestions from sgran
Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rwxr-xr-x | bin/ftpsync | 8 | ||||
-rwxr-xr-x | bin/runmirrors | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/ftpsync b/bin/ftpsync index de2cb47..5b0a894 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -125,9 +125,7 @@ touch "${UPDATEREQUIRED}" # If we are here for the first time, create the # destination and the trace directory -if [ ! -d "${TO}/project/trace/" ]; then - mkdir -p ${TO}/project/trace -fi +mkdir -p ${TO}/project/trace # Check to see if another sync is in progress if ${LOCKFILE} -! -l 43200 -r 0 "${LOCK}"; then @@ -154,7 +152,9 @@ while [ -e "${UPDATEREQUIRED}" ]; do ${RSYNC_USER}@${RSYNC_HOST}::${RSYNC_PATH} ${TO} result=$? - if [ $result -eq 0 ]; then + # 24 - vanished source files. Ignore, that should be the target of $UPDATEREQUIRED + # and us re-running. + if [ $result -eq 0 || $result -eq 24 ]; then # We are lucky, it worked. Now do step 2 and sync again, this time including # the packages/releases files ${RSYNC} ${RSYNC_OPTIONS} ${RSYNC_OPTIONS2} ${EXCLUDE} ${SOURCE_EXCLUDE} \ diff --git a/bin/runmirrors b/bin/runmirrors index ed6ead4..b2ac7e0 100755 --- a/bin/runmirrors +++ b/bin/runmirrors @@ -65,7 +65,7 @@ set +e # Now read our mirrorfile and push the mirrors defined in there. # We use grep to easily sort out all lines having a # in front of them. -grep -v ^# ${HOME}/etc/runmirrors.mirror | +egrep -v '^[[:space:]]*(#|$)' ${HOME}/etc/runmirrors.mirror | while read MLNAME MHOSTNAME MUSER MPROTO MKEYFILE; do # Process the two options that can be left blank in the config if [ -z ${MPROTO} ]; then |