aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcarey.xu <carey.xuhan@huawei.com>2015-09-12 14:14:20 +0800
committercarey.xu <carey.xuhan@huawei.com>2015-09-12 14:14:20 +0800
commit0e31ef15f4765216d7d7c2354c09576681cda7ff (patch)
tree7950ee7dcc35e9c764315a03bcd421e7974437a4
parent6ec9d66787b01e710de5514f377830a94e32a4d2 (diff)
Ensure the fuser related package exists for building
Change-Id: I7b2cb14d0ea02e504f9cc83213b5e29d3cc9695b JIRA: COMPASS-47
-rwxr-xr-xbuild.sh8
1 files changed, 4 insertions, 4 deletions
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