From: George Dunlap Subject: [PATCH 4/8] raisin: Use PKGTYPE rather than DISTRO to determine how to build a package Date: Thu, 16 Apr 2015 17:19:38 +0100 Message-ID: <1429201182-1044-4-git-send-email-george.dunlap@eu.citrix.com> References: <1429201182-1044-1-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1429201182-1044-1-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: George Dunlap , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Signed-off-by: George Dunlap --- CC: Stefano Stabellini --- 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" } function install_package() { -- 1.9.1