From: Stefano Stabellini Date: Wed, 18 Mar 2015 14:52:17 +0000 (+0000) Subject: Use local variables to store the list dependencies X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=42f98279162cb688d15ece67f9a7e082c8b5e8d8;p=raisin.git Use local variables to store the list dependencies Signed-off-by: Stefano Stabellini --- diff --git a/grub.sh b/grub.sh index 075763c..40d9c16 100644 --- a/grub.sh +++ b/grub.sh @@ -4,18 +4,18 @@ source config source common-functions.sh -DEP_Debian_common="git build-essential tar autoconf bison flex" -DEP_Debian_x86_32="$DEP_Debian_common" -DEP_Debian_x86_64="$DEP_Debian_common libc6-dev-i386" -DEP_Debian_arm32="$DEP_Debian_common" -DEP_Debian_arm64="$DEP_Debian_common" +function grub_install_dependencies() { + local DEP_Debian_common="git build-essential tar autoconf bison flex" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_common libc6-dev-i386" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_common" -DEP_Fedora_common="git make gcc tar automake autoconf sysconftool bison flex" -DEP_Fedora_x86_32="$DEP_Fedora_common" -DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" + local DEP_Fedora_common="git make gcc tar automake autoconf sysconftool bison flex" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_common glibc-devel.i686" -function grub_build() { if test $ARCH != "x86_64" && test $ARCH != "x86_32" then echo grub is only supported on x86_32 and x86_64 @@ -23,6 +23,11 @@ function grub_build() { fi echo installing Grub dependencies eval install_dependencies \$DEP_"$DISTRO"_"$ARCH" +} + + +function grub_build() { + grub_install_dependencies tar cf memdisk.tar grub.cfg ./git-checkout.sh $GRUB_UPSTREAM_URL $GRUB_UPSTREAM_REVISION grub-dir diff --git a/libvirt.sh b/libvirt.sh index fda68f6..f63454f 100644 --- a/libvirt.sh +++ b/libvirt.sh @@ -4,20 +4,30 @@ source config source common-functions.sh -DEP_Debian_common="git build-essential libtool autoconf autopoint xsltproc libxml2-utils pkg-config python-dev libxml-xpath-perl libyajl-dev libxml2-dev gettext libdevmapper-dev libnl-3-dev libnl-route-3-dev" -DEP_Debian_x86_32="$DEP_Debian_common" -DEP_Debian_x86_64="$DEP_Debian_common" -DEP_Debian_arm32="$DEP_Debian_common" -DEP_Debian_arm64="$DEP_Debian_common" +function libvirt_install_dependencies() { + local DEP_Debian_common="git build-essential libtool autoconf autopoint \ + xsltproc libxml2-utils pkg-config python-dev \ + libxml-xpath-perl libyajl-dev libxml2-dev \ + gettext libdevmapper-dev libnl-3-dev \ + libnl-route-3-dev" + local DEP_Debian_x86_32="$DEP_Debian_common" + local DEP_Debian_x86_64="$DEP_Debian_common" + local DEP_Debian_arm32="$DEP_Debian_common" + local DEP_Debian_arm64="$DEP_Debian_common" + + local DEP_Fedora_common="git patch make gcc libtool autoconf gettext-devel \ + python-devel libxslt yajl-devel libxml2-devel \ + device-mapper-devel libpciaccess-devel \ + libuuid-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common" + local DEP_Fedora_x86_64="$DEP_Fedora_common" -DEP_Fedora_common="git patch make gcc libtool autoconf gettext-devel python-devel libxslt yajl-devel libxml2-devel device-mapper-devel libpciaccess-devel libuuid-devel" -DEP_Fedora_x86_32="$DEP_Fedora_common" -DEP_Fedora_x86_64="$DEP_Fedora_common" - - -function libvirt_build() { echo installing Libvirt dependencies eval install_dependencies \$DEP_"$DISTRO"_"$ARCH" +} + +function libvirt_build() { + libvirt_install_dependencies ./git-checkout.sh $LIBVIRT_UPSTREAM_URL $LIBVIRT_UPSTREAM_REVISION libvirt-dir cd libvirt-dir diff --git a/xen.sh b/xen.sh index 484e358..97ba579 100644 --- a/xen.sh +++ b/xen.sh @@ -4,24 +4,27 @@ source config source common-functions.sh -DEP_Debian_common="git build-essential python-dev gettext uuid-dev \ - libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev \ - libssl-dev libpixman-1-dev" -DEP_Debian_x86_32="$DEP_Debian_common bcc iasl bin86 texinfo" -DEP_Debian_x86_64="$DEP_Debian_x86_32 libc6-dev-i386" -DEP_Debian_arm32="$DEP_Debian_common libfdt-dev" -DEP_Debian_arm64="$DEP_Debian_arm32" +function xen_install_dependencies() { + local DEP_Debian_common="git build-essential python-dev gettext uuid-dev \ + libncurses5-dev libyajl-dev libaio-dev pkg-config libglib2.0-dev \ + libssl-dev libpixman-1-dev" + local DEP_Debian_x86_32="$DEP_Debian_common bcc iasl bin86 texinfo" + local DEP_Debian_x86_64="$DEP_Debian_x86_32 libc6-dev-i386" + local DEP_Debian_arm32="$DEP_Debian_common libfdt-dev" + local DEP_Debian_arm64="$DEP_Debian_arm32" + + local DEP_Fedora_common="git make gcc python-devel gettext libuuid-devel \ + ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel \ + patch pixman-devel" + local DEP_Fedora_x86_32="$DEP_Fedora_common dev86 iasl texinfo" + local DEP_Fedora_x86_64="$DEP_Fedora_x86_32 glibc-devel.i686" -DEP_Fedora_common="git make gcc python-devel gettext libuuid-devel \ - ncurses-devel glib2-devel libaio-devel openssl-devel yajl-devel patch \ - pixman-devel" -DEP_Fedora_x86_32="$DEP_Fedora_common dev86 iasl texinfo" -DEP_Fedora_x86_64="$DEP_Fedora_x86_32 glibc-devel.i686" - - -function xen_build() { echo installing Xen dependencies eval install_dependencies \$DEP_"$DISTRO"_"$ARCH" +} + +function xen_build() { + xen_install_dependencies ./git-checkout.sh $XEN_UPSTREAM_URL $XEN_UPSTREAM_REVISION xen-dir cd xen-dir