[MERGE] Doc lp-upload-release

Martin Pool mbp at sourcefrog.net
Tue Oct 21 00:46:22 BST 2008

On Tue, Oct 21, 2008 at 7:52 AM, John Arbash Meinel
<john at arbash-meinel.com> wrote:
>> === added file 'tools/packaging/lp-upload-release'
>> --- tools/packaging/lp-upload-release 1970-01-01 00:00:00 +0000
>> +++ tools/packaging/lp-upload-release 2008-10-20 07:57:05 +0000
>> @@ -0,0 +1,80 @@
>> +#! /bin/zsh -e
> ^- All of our other scripts are /bin/sh I believe, or at most /bin/bash.
> Is there anything specific that requires zsh for this script? The only
> thing I see is the "setopt extended_glob". Which I guess you are doing
> with this?:
> +filetype="${upfile:e}"
> Anyway, I think the script can be useful, even better if it could probe
> LP to see that a release wasn't registered yet, and take care of all
> that :).
> I'd *like* to see it only require sh/bash, but if it is hard to do, zsh
> is available on all of *my* platforms as well.

Yes, zsh is needed for the complicated variable expansions.  The
extended_glob option allows things like this


Obviously you can do this in bash, possibly by calling awk etc, but I
think it's more readable in zsh, though arguably, still not all that
readable.  If it got any larger I would definitely think about moving
it to Python, and I'll take James's advice to look at launchpadlib.

Martin <http://launchpad.net/~mbp/>

More information about the bazaar mailing list