duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] The awk command that strips the --exclude and --inc


From: edgar . soldin
Subject: Re: [Duplicity-talk] The awk command that strips the --exclude and --include parameters from DUPL_PARAMS fails to remove a one byte parameter value.
Date: Tue, 24 Apr 2018 21:23:16 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

hey Rob,

i could reproduce the issue. as in/excludes might as well have spaces or might 
be be wrapped in apostrophes i will probably drop awk for this and writw a more 
elaborate function to do the stripping.

good catch! ..ede/duply.net

On 4/19/2018 21:39, Rob Adair 'Profitable Business Systems' via Duplicity-talk 
wrote:
> original:
> 
> function duplicity_params_conf {
>   # reuse cmd var from main loop
>   ## in/exclude parameters are currently not supported on restores
>   if [ "$cmd" = "fetch" ] || [ "$cmd" = "restore" ] || [ "$cmd" = "status" ]; 
> then
>     # filter exclude params from fetch/restore
>                                                                               
>  vvv
>     echo "$DUPL_PARAMS" | awk '{gsub(/--(ex|in)clude[a-z-]*(([ \t]+|=)[^-][^ 
> \t]+)?/,"");print}'
>     return
>   fi
>   
>   echo "$DUPL_PARAMS"
> }
> 
> 
> function duplicity_params_conf {
>   # reuse cmd var from main loop
>   ## in/exclude parameters are currently not supported on restores
>   if [ "$cmd" = "fetch" ] || [ "$cmd" = "restore" ] || [ "$cmd" = "status" ]; 
> then
>     # filter exclude params from fetch/restore
>                                                                               
>  vvv
>     echo "$DUPL_PARAMS" | awk '{gsub(/--(ex|in)clude[a-z-]*(([ \t]+|=)[^-][^ 
> \t]*)?/,"");print}'
>     return
>   fi
>   
>   echo "$DUPL_PARAMS"
> }
> 
> 
> DUPL_PARAMS="$DUPL_PARAMS --include /etc --include /home --include 
> /opt/zimbra/backup --exclude /"
> 
> duply failed to remove the / after --exclude.
> 
> 
> 
> 
> 
> _______________________________________________
> Duplicity-talk mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]