[arch-projects] [devtools] [PATCH 3/3] get_full_version :: remove duplicated epoch check
Dave Reisner
d at falconindy.com
Sat Feb 15 13:13:41 EST 2014
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
> echo $pkgver-$pkgrel
> else
> echo $epoch:$pkgver-$pkgrel
> --
> 1.8.5.5
>
More information about the arch-projects
mailing list