[arch-projects] [PATCH] archrelease: call 'svn copy' once for all files
Lukas Fleischer
archlinux at cryptocrack.de
Fri Sep 9 14:44:12 EDT 2011
On Thu, Sep 08, 2011 at 04:38:28PM -0500, Dan McGee wrote:
> We don't need to invoke svn copy on each file; it accepts multiple
> arguments. This cut Allan's time releasing one patch-friendly package
> from 5 minutes to 2 minutes.
>
> Signed-off-by: Dan McGee <dan at archlinux.org>
> ---
> archrelease | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/archrelease b/archrelease
> index 2f6a563..7bb4c8a 100755
> --- a/archrelease
> +++ b/archrelease
> @@ -52,9 +52,8 @@ for tag in "$@"; do
> svn add --parents -q "repos/$tag"
> fi
>
> - for file in "${known_files[@]}"; do
> - svn copy -q -r HEAD "$trunk/$file" "repos/$tag/"
> - done
> + # copy all files at once from trunk to the subdirectory in repos/
> + svn copy -q -r HEAD ${known_files[@]/#/$trunk/} "repos/$tag/"
+1 from me. I wondered why we were looping over the single files in the
first place. However, if we copy from current HEAD anyway, I don't see
any reason to not just use `svn copy -q -r HEAD "$trunk/" "repos/$tag/"`
here.
>
> echo 'done'
> done
> --
> 1.7.6.1
More information about the arch-projects
mailing list