On Thu, 16 Apr 2015, George Dunlap wrote:
> Signed-off-by: George Dunlap <george.dun...@eu.citrix.com>
> ---
> CC: Stefano Stabellini <stefano.stabell...@citrix.com>
> ---
>  lib/common-functions.sh | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/common-functions.sh b/lib/common-functions.sh
> index 373d6fb..e66c6f4 100644
> --- a/lib/common-functions.sh
> +++ b/lib/common-functions.sh
> @@ -239,16 +239,16 @@ function for_each_component () {
>      done
>  }
>  
> +function _build_package_deb() {
> +    fakeroot bash ./scripts/mkdeb "$1"
> +}
> +
> +function _build_package_rpm() {
> +    ./scripts/mkrpm "$1"
> +}
> +
>  function build_package() {
> -    if [[ $DISTRO = "Debian" ]]
> -    then
> -        fakeroot bash ./scripts/mkdeb "$1"
> -    elif [[  $DISTRO = "Fedora" ]]
> -    then
> -        ./scripts/mkrpm "$1"
> -    else
> -        echo "Don't know how to create packages for $DISTRO"
> -    fi
> +    _build_package_${PKGTYPE} "$1"

Just use "$PKGTYPE" instead of ${}
Also please document PKGTYPE among the exported global variables in the
README.


>  }
>  
>  function install_package() {
> -- 
> 1.9.1
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to