[arch-projects] [devtools] [PATCH 3/3] get_full_version :: remove duplicated epoch check
Ike Devolder
ike.devolder at gmail.com
Sat Feb 15 14:56:12 EST 2014
On Sat, Feb 15, 2014 at 01:13:41PM -0500, Dave Reisner wrote:
> On Sat, Feb 15, 2014 at 06:13:43PM +0100, BlackEagle wrote:
> > Signed-off-by: BlackEagle <ike.devolder at gmail.com>
> > ---
> > lib/common.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/common.sh b/lib/common.sh
> > index 3ca1c7e..b817683 100644
> > --- a/lib/common.sh
> > +++ b/lib/common.sh
> > @@ -114,7 +114,7 @@ get_full_version() {
> > pkgbase=${pkgbase:-${pkgname[0]}}
> > epoch=${epoch:-0}
> > if [[ -z $1 ]]; then
> > - if [[ $epoch ]] && (( ! $epoch )); then
> > + if (( ! $epoch )); then
>
> This will break when epoch isn't defined -- that's why the original
> string based check is "necessary". It be avoided though, if you write
> this as:
>
> if (( ! epoch )); then
>
But epoch is always there: epoch=${ecpoch:-O}
> > echo $pkgver-$pkgrel
> > else
> > echo $epoch:$pkgver-$pkgrel
> > --
> > 1.8.5.5
> >
--
Ike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20140215/49aaea3e/attachment.asc>
More information about the arch-projects
mailing list