Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
source grub.sh
source libvirt.sh
+help() {
+ echo "Usage: ./build.sh <options>"
+ echo "where options are:"
+ echo " -n | --no-deps Do no install build-time dependencies"
+ echo " -v | --verbose Verbose"
+}
# execution
if test $EUID -eq 0
exit 1
fi
+# parameters check
+export NO_DEPS=0
+export VERBOSE=0
+while test $# -ge 1
+do
+ if test "$1" = "-n" || test "$1" = "--no-deps"
+ then
+ NO_DEPS=1
+ shift 1
+ elif test "$1" = "-v" || test "$1" = "--verbose"
+ then
+ VERBOSE=1
+ shift 1
+ else
+ help
+ exit 1
+ fi
+done
+
+
get_distro
get_arch
}
function install_dependencies() {
+ if test "$NO_DEPS" && test "$NO_DEPS" -eq 1
+ then
+ echo "Not installing any dependencies, as requested."
+ echo "Depency list: $*"
+ return 0
+ fi
case $DISTRO in
"Debian" | "Ubuntu" )
$SUDO apt-get install -y $*