Merge pull request #43 from rodolfoams/master

Fixes problem described in issue #40
This commit is contained in:
yuyuany 2016-11-10 09:44:26 +08:00 committed by GitHub
commit cdf56372ec
3 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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