summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-06-05 08:31:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-05 08:31:01 +0000
commita8ad5e87de3127bc5fbb4979b2e5728f80e8e454 (patch)
tree9baef4d9b1e9c67527b8795e7b5359870c15f2ed
parent0e1b3483f1514177b61a645abda906b68b13bd36 (diff)
parentf63050d7890d4341a5cb6af8323dbf3c5b9fe1ab (diff)
Merge "Added arm condition in install.sh to avoid installation error on ubuntu."
-rwxr-xr-xinstall.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index dc2663628..b8212d2f4 100755
--- a/install.sh
+++ b/install.sh
@@ -22,12 +22,15 @@ deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main unive
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" > "${sub_source_file}"
echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
-dpkg --add-architecture arm64
+
+proc_type=$(uname -m)
+if [[ $proc_type == "arm"* ]]; then
+ dpkg --add-architecture arm64
+fi
# install tools
apt-get update && apt-get install -y \
qemu-user-static/xenial \
- libc6:arm64 \
wget \
expect \
curl \
@@ -49,6 +52,10 @@ apt-get update && apt-get install -y \
python-pip \
vim
+if [[ $proc_type == "arm"* ]]; then
+ apt-get install -y libc6:arm64
+fi
+
apt-get -y autoremove && apt-get clean
git config --global http.sslVerify false