Преглед на файлове

Merge pull request #43 from rodolfoams/master

Fixes problem described in issue #40
yuyuany преди 7 години
родител
ревизия
cdf56372ec
променени са 3 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 2 2
      linux/installer/bin/build-installpkg.sh
  2. 2 2
      linux/installer/common/psw/createTarball.sh
  3. 2 2
      linux/installer/common/sdk/createTarball.sh

+ 2 - 2
linux/installer/bin/build-installpkg.sh

@@ -57,8 +57,8 @@ BUILD_DIR=${ROOT_DIR}/build/linux
 # Get the architecture of the build from generated binary
 get_arch()
 {
-    local a=$(readelf -h $BUILD_DIR/sgx_sign | awk '/Class:/{print $2}')
-    test $a = ELF64 && echo 'x86_64' || echo 'x86'
+    local a=$(readelf -h $BUILD_DIR/sgx_sign | sed -n '2p' | awk '/:/{print $6}')
+    test $a = 02 && echo 'x86_64' || echo 'x86'
 }
  
 

+ 2 - 2
linux/installer/common/psw/createTarball.sh

@@ -47,8 +47,8 @@ rm -fr ${INSTALL_PATH}
 # Get the architecture of the build from generated binary
 get_arch()
 {
-    local a=$(readelf -h $BUILD_DIR/sgx_sign | awk '/Class:/{print $2}')
-    test $a = ELF64 && echo 'x64' || echo 'x86'
+    local a=$(readelf -h $BUILD_DIR/sgx_sign | sed -n '2p' | awk '/:/{print $6}')
+    test $a = 02 && echo 'x64' || echo 'x86'
 }
 
 ARCH=$(get_arch)

+ 2 - 2
linux/installer/common/sdk/createTarball.sh

@@ -47,8 +47,8 @@ rm -fr ${INSTALL_PATH}
 # Get the architecture of the build from generated binary
 get_arch()
 {
-    local a=$(readelf -h $BUILD_DIR/sgx_sign | awk '/Class:/{print $2}')
-    test $a = ELF64 && echo 'x64' || echo 'x86'
+    local a=$(readelf -h $BUILD_DIR/sgx_sign | sed -n '2p' | awk '/:/{print $6}')
+    test $a = 02 && echo 'x64' || echo 'x86'
 }
 
 ARCH=$(get_arch)