[PATCH conductor] Add test for file exists before copy in aeolus-configure.spec.in

John Eckersberg jeckersb at redhat.com
Tue Feb 21 21:00:38 UTC 2012


On Tue, 21 Feb 2012 13:09:31 -0600, Steve Linabery <slinaber at redhat.com> wrote:
> We previously added an empty directory at config/locales/overrides which
> caused the existing file copying to fail when no config/locales/overrides/*.yml
> was present. This fix tests to see if a file is present before attempting to copy.
> ---
>  aeolus-conductor.spec.in |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/aeolus-conductor.spec.in b/aeolus-conductor.spec.in
> index c899190..eb19c82 100644
> --- a/aeolus-conductor.spec.in
> +++ b/aeolus-conductor.spec.in
> @@ -178,7 +178,9 @@ for filetype in builder css feature gif haml html ico jpg js json key opts png \
>  
>      for dir in $dirs; do
>          %{__mkdir} -p %{buildroot}%{app_root}/$dir
> -        %{__cp} src/$dir/*.$filetype %{buildroot}%{app_root}/$dir
> +	for i in $(echo src/$dir/*.$filetype); do
> +            test -e "$i" && %{__cp} $i %{buildroot}%{app_root}/$dir
> +        done
>      done
>  done
>  %{__rm} %{buildroot}%{app_root}/config/initializers/secret_token.rb
> -- 
> 1.7.6.5
> 

ACK



More information about the aeolus-devel mailing list