diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-04-12 18:22:50 +0800 |
---|---|---|
committer | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-04-25 13:48:06 +0800 |
commit | 949505a4bccb95437f7b992597175e16b9a4fae3 (patch) | |
tree | 6f9d9630bf6f594a6815eee7ed7f0caea7272633 /bin/install_dkg_dep.sh | |
parent | 3939c62ed80c59f1a06bf0978598b1ea2c40a496 (diff) | |
download | dexon-consensus-wip/lantw/license-makefile-shell-scripts.tar.gz dexon-consensus-wip/lantw/license-makefile-shell-scripts.tar.zst dexon-consensus-wip/lantw/license-makefile-shell-scripts.zip |
Merge Makefile and shell script improvements from an internal projectwip/lantw/license-makefile-shell-scripts
The Makefile used in this project was based on the one used in an
internal project. Since the Makefile and shell scripts have been
refactored several times and become easier to use, it should be good to
bring these improvements to the project.
Diffstat (limited to 'bin/install_dkg_dep.sh')
-rwxr-xr-x | bin/install_dkg_dep.sh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bin/install_dkg_dep.sh b/bin/install_dkg_dep.sh index 7d02437..b87e3e4 100755 --- a/bin/install_dkg_dep.sh +++ b/bin/install_dkg_dep.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/bin/sh + +: "${MAKE:="make"}" if [ -e .dep/dkg ]; then exit 0 @@ -6,13 +8,14 @@ fi if [ ! -d .dep/dkg ]; then mkdir -p .dep/dkg - cd .dep/dkg - git clone --depth 1 -b master git://github.com/dexon-foundation/bls.git & - git clone --depth 1 -b master git://github.com/dexon-foundation/mcl.git & - wait - cd bls - make test_go -j MCL_USE_OPENSSL=0 - cd ../../../ + ( + cd .dep/dkg || exit + git clone --depth 1 -b master git://github.com/dexon-foundation/bls.git & + git clone --depth 1 -b master git://github.com/dexon-foundation/mcl.git & + wait + cd bls || exit + eval "${MAKE} test_go -j MCL_USE_OPENSSL=0" + ) || exit fi cd vendor/github.com/dexon-foundation && rm -rf bls mcl ln -s ../../../.dep/dkg/* . |