X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fdup;h=edb43ac4b90ddcf8b732f92ae9e7811692e1f48d;hp=c16ec40f83da0984973898b4f912596725954144;hb=be75e4e6c536882c14db9a41c61585e7a9c045f6;hpb=a65bc7af30e0ba963a007bc47b6287054bc2f276 diff --git a/handlers/dup b/handlers/dup index c16ec40..edb43ac 100644 --- a/handlers/dup +++ b/handlers/dup @@ -71,10 +71,10 @@ fi ### COMMAND-LINE MANGLING ### # duplicity >= 0.4.2 needs --sftp-command (NB: sftp does not support the -l option) -duplicity_version="`duplicity --version | awk '{print $2}'`" -duplicity_major="`echo $duplicity_version | awk -F '.' '{print $1}'`" -duplicity_minor="`echo $duplicity_version | awk -F '.' '{print $2}'`" -duplicity_sub="`echo $duplicity_version | awk -F '.' '{print $3}'`" +duplicity_version="`duplicity --version | @AWK@ '{print $2}'`" +duplicity_major="`echo $duplicity_version | @AWK@ -F '.' '{print $1}'`" +duplicity_minor="`echo $duplicity_version | @AWK@ -F '.' '{print $2}'`" +duplicity_sub="`echo $duplicity_version | @AWK@ -F '.' '{print $3}'`" if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 4 -a "$duplicity_sub" -ge 2 ]; then sftpoptions="$sshoptions" fi @@ -129,28 +129,17 @@ execstr_clientpart="/" set -o noglob -symlinks_warning="Maybe you have mixed symlinks and '*' in this statement, which is not supported." - # excludes for i in $exclude; do str="${i//__star__/*}" - str=`readlink -f $str` - if [ -n "$str" ]; then - execstr="${execstr}--exclude '$str' " - else - warning "exclude statement ${i//__star__/*} will be ignored. $symlinks_warning" - fi + execstr="${execstr}--exclude '$str' " done # includes for i in $include; do + [ "$i" != "/" ] || fatal "Sorry, you cannot use 'include = /'" str="${i//__star__/*}" - str=`readlink -f $str` - if [ -n "$str" ]; then - execstr="${execstr}--include '$str' " - else - warning "include statement ${i//__star__/*} will be ignored. $symlinks_warning" - fi + execstr="${execstr}--include '$str' " done # vsincludes @@ -158,12 +147,8 @@ if [ $usevserver = yes ]; then for vserver in $vsnames; do for vi in $vsinclude; do str="${vi//__star__/*}" - str=`readlink -f $VROOTDIR/$vserver$str` - if [ -n "$str" ]; then - execstr="${execstr}--include '$str' " - else - warning "vsinclude statement ${vi//__star__/*} will be ignored for VServer $vserver. $symlinks_warning" - fi + str="$VROOTDIR/$vserver$str" + execstr="${execstr}--include '$str' " done done fi