Added arm condition in install.sh to avoid installation error on ubuntu. 87/35287/2
authorMaciej Skrocki <maciej.skrocki@intel.com>
Tue, 16 May 2017 20:58:41 +0000 (13:58 -0700)
committerMaciej Skrocki <maciej.skrocki@intel.com>
Thu, 25 May 2017 20:44:35 +0000 (20:44 +0000)
Change-Id: Iaa07a8d68a7dede6f2b42440be44ed07f035b1ca
Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
install.sh

index dc26636..b8212d2 100755 (executable)
@@ -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