You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesatee.apache.org by ms...@apache.org on 2019/11/23 00:21:08 UTC

[incubator-mesatee] branch master updated: Automatically download new mesapy if the version was changed. (#84)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee.git


The following commit(s) were added to refs/heads/master by this push:
     new 913ee50  Automatically download new mesapy if the version was changed. (#84)
913ee50 is described below

commit 913ee501925d3bf04a5da4053ff3f33d805ae7cc
Author: Rundong Zhou <ru...@gmail.com>
AuthorDate: Fri Nov 22 16:21:03 2019 -0800

    Automatically download new mesapy if the version was changed. (#84)
---
 CMakeLists.txt        | 2 +-
 cmake/scripts/prep.sh | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2adfd4..5cb68d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ SET_STRVAR_FROM_ENV_OR(SGX_SDK "/opt/sgxsdk" "Path of SGX SDK")
 SET_STRVAR_FROM_ENV_OR(SGX_MODE "HW" "Mode of SGX, HW or SW")
 SET_STRVAR_FROM_ENV_OR(RUSTFLAGS "" "Rust flags")
 SET_STRVAR_FROM_ENV_OR(MESATEE_CMAKE_DBG "" "set to turn on debug message for cmake")
-set(MESAPY_VERSION 2b7ea38773d337d106c613a239661a60a4fa7528 CACHE STRING "mesapy version")
+set(MESAPY_VERSION 2b7ea38773d337d106c613a239661a60a4fa7528)
 option(COV OFF "Turn on coverage or not")
 # ======= VARIABLES FOR CMAKE -D{VAR}=VAL CONFIGURATION END =======
 
diff --git a/cmake/scripts/prep.sh b/cmake/scripts/prep.sh
index 8ab4a25..2be944e 100755
--- a/cmake/scripts/prep.sh
+++ b/cmake/scripts/prep.sh
@@ -18,10 +18,12 @@ ln -snf ${CMAKE_BINARY_DIR} /tmp/mesatee_symlinks/mesatee_build
 if git submodule status | egrep -q '^[-]|^[+]'; then echo 'INFO: Need to reinitialize git submodules' && git submodule update --init --recursive; fi
 rustup install --no-self-update ${RUSTUP_TOOLCHAIN} > /dev/null 2>&1
 # get mesapy
-if [ ! -f ${MESATEE_OUT_DIR}/libpypy-c.a ]; then
-    $(cd ${MESATEE_OUT_DIR};
+if [ ! -f ${MESATEE_OUT_DIR}/libpypy-c.a ] || [ ! -f ${MESATEE_OUT_DIR}/${MESAPY_VERSION}-mesapy-sgx.tar.gz ]; then
+    cd ${MESATEE_OUT_DIR};
+    echo "Downloading MesaPy ${MESAPY_VERSION}..."
     wget -qN https://mesapy.org/release/${MESAPY_VERSION}-mesapy-sgx.tar.gz;
-    tar xzf ${MESAPY_VERSION}-mesapy-sgx.tar.gz)
+    tar xzf ${MESAPY_VERSION}-mesapy-sgx.tar.gz;
+    cd -
 fi
 # build libEnclave_u.a & libEnclave_t.o
 if [ ! -f ${MESATEE_OUT_DIR}/libEnclave_u.a ]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org