Fixes for RC3

This commit is contained in:
deajan 2014-05-27 12:47:50 +02:00
parent fa19036de6
commit eeb0ef3722
2 changed files with 9 additions and 4 deletions

View File

@ -25,6 +25,9 @@ UNDER WORK
RECENT CHANGES RECENT CHANGES
-------------- --------------
- 27 May 2014: Osync 0.99 RC3
- Additionnal delete fix for *BSD and MSYS (deleted file list not created right)
- Fixed dry mode to use non dry after run treelists to create delete lists
- Added follow symlink parameter - Added follow symlink parameter
- Minor fixes in parameter list when bandwidth parameter is used - Minor fixes in parameter list when bandwidth parameter is used
- Added some additionnal checks for *BSD and MacOS environments - Added some additionnal checks for *BSD and MacOS environments

View File

@ -4,8 +4,9 @@ PROGRAM="Osync" # Rsync based two way sync engine with fault tolerance
AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong" AUTHOR="(L) 2013-2014 by Orsiris \"Ozy\" de Jong"
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
PROGRAM_VERSION=0.99RC3 PROGRAM_VERSION=0.99RC3
PROGRAM_BUILD=2705201401 PROGRAM_BUILD=2705201403
## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode
if ! type -p "$BASH" > /dev/null if ! type -p "$BASH" > /dev/null
then then
echo "Please run this script only with bash shell. Tested on bash >= 3.2" echo "Please run this script only with bash shell. Tested on bash >= 3.2"
@ -950,15 +951,15 @@ function tree_list
function delete_list function delete_list
{ {
Log "Creating $1 replica deleted file list." Log "Creating $1 replica deleted file list."
if [ -f "$MASTER_STATE_DIR/$1-tree-after-$SYNC_ID" ] if [ -f "$MASTER_STATE_DIR/$1$TREE_AFTER_FILENAME_NO_SUFFIX" ]
then then
## Same functionnality, comm is much faster than grep but is not available on every platform ## Same functionnality, comm is much faster than grep but is not available on every platform
if type -p comm > /dev/null 2>&1 if type -p comm > /dev/null 2>&1
then then
cmd="comm -23 \"$MASTER_STATE_DIR/$1$2\" \"$MASTER_STATE_DIR/$1$3\" > \"$MASTER_STATE_DIR/$1$4\"" cmd="comm -23 \"$MASTER_STATE_DIR/$1$TREE_AFTER_FILENAME_NO_SUFFIX\" \"$MASTER_STATE_DIR/$1$3\" > \"$MASTER_STATE_DIR/$1$4\""
else else
## The || : forces the command to have a good result ## The || : forces the command to have a good result
cmd="grep -F -x -v -f \"$MASTER_STATE_DIR/$1$3\" \"$MASTER_STATE_DIR/$1$2\" || : > \"$MASTER_STATE_DIR/$1$4\"" cmd="(grep -F -x -v -f \"$MASTER_STATE_DIR/$1$3\" \"$MASTER_STATE_DIR/$1$TREE_AFTER_FILENAME_NO_SUFFIX\" || :) > \"$MASTER_STATE_DIR/$1$4\""
fi fi
LogDebug "CMD: $cmd" LogDebug "CMD: $cmd"
@ -1782,6 +1783,7 @@ function Init
TREE_CURRENT_FILENAME="-tree-current-$SYNC_ID$dry_suffix" TREE_CURRENT_FILENAME="-tree-current-$SYNC_ID$dry_suffix"
TREE_AFTER_FILENAME="-tree-after-$SYNC_ID$dry_suffix" TREE_AFTER_FILENAME="-tree-after-$SYNC_ID$dry_suffix"
TREE_AFTER_FILENAME_NO_SUFFIX="-tree-after-$SYNC_ID"
DELETED_LIST_FILENAME="-deleted-list$SYNC_ID$dry_suffix" DELETED_LIST_FILENAME="-deleted-list$SYNC_ID$dry_suffix"
MASTER_LAST_ACTION="$MASTER_STATE_DIR/last-action-$SYNC_ID$dry_suffix" MASTER_LAST_ACTION="$MASTER_STATE_DIR/last-action-$SYNC_ID$dry_suffix"
MASTER_RESUME_COUNT="$MASTER_STATE_DIR/resume-count-$SYNC_ID$dry_suffix" MASTER_RESUME_COUNT="$MASTER_STATE_DIR/resume-count-$SYNC_ID$dry_suffix"