From 0e31ef15f4765216d7d7c2354c09576681cda7ff Mon Sep 17 00:00:00 2001 From: "carey.xu" Date: Sat, 12 Sep 2015 14:14:20 +0800 Subject: Ensure the fuser related package exists for building Change-Id: I7b2cb14d0ea02e504f9cc83213b5e29d3cc9695b JIRA: COMPASS-47 --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index f9e23870..88308190 100755 --- a/build.sh +++ b/build.sh @@ -4,19 +4,19 @@ set -ex SCRIPT_DIR=`cd ${BASH_SOURCE[0]%/*};pwd` COMPASS_DIR=${SCRIPT_DIR} WORK_DIR=$SCRIPT_DIR/work/building +PACKAGES="fuse fuseiso createrepo genisoimage curl" source $SCRIPT_DIR/build/build.conf mkdir -p $WORK_DIR cd $WORK_DIR - function prepare_env() { set +e - for i in createrepo genisoimage curl; do - $i --version >/dev/null 2>&1 - if [[ $? -ne 0 ]]; then + for i in $PACKAGES; do + if ! apt --installed list 2>/dev/null |grep "\<$i\>" + then sudo apt-get install -y --force-yes $i fi done -- cgit 1.2.3-korg