[Buildroot] [PATCH 1/3] support/download/cvs: add support to use a date instead of a tag

Yann E. MORIN yann.morin.1998 at free.fr
Sun Apr 19 08:04:51 UTC 2015


Fabio, All,

On 2015-04-18 18:54 +0200, Fabio Porcedda spake thusly:
> This is useful when a tag is not avaiable.
> 
> Signed-off-by: Fabio Porcedda <fabio.porcedda at gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>

Although I'm not a big fan of the [[...]] bashism, that's OK since it
makes things so much simpler.

Regards,
Yann E. MORIN.

> ---
>  support/download/cvs | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/support/download/cvs b/support/download/cvs
> index 2c3a666..6491cc8 100755
> --- a/support/download/cvs
> +++ b/support/download/cvs
> @@ -26,7 +26,15 @@ rev="${3}"
>  rawname="${4}"
>  basename="${5}"
>  
> +if [[ ${rev} =~ ^[0-9] ]]; then
> +    # Date, because a tag cannot begin with a number
> +    select="-D ${rev}"
> +else
> +    # Tag
> +    select=-"r :${rev}"
> +fi
> +
>  ${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
> -       co -d "${basename}" -r ":${rev}" -P "${rawname}"
> +       co -d "${basename}" ${select} -P "${rawname}"
>  
>  tar czf "${output}" "${basename}"
> -- 
> 2.3.5
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list