Use WASMER_DIR if present when INSTALL_DIRECTORY is not present

Fixed #549
This commit is contained in:
Syrus Akbary 2019-07-11 16:22:02 -07:00 committed by GitHub
parent 9e974c7ce3
commit 0583da0ae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -365,10 +365,14 @@ wasmer_download() {
# determine install directory if required
if [ -z "$INSTALL_DIRECTORY" ]; then
# If WASMER_DIR is present
if [ -z "$WASMER_DIR" ]; then
INSTALL_DIRECTORY=WASMER_DIR
else
# findWasmerBinDirectory INSTALL_DIRECTORY
INSTALL_DIRECTORY="$HOME/.wasmer"
fi
WASMER=INSTALL_DIRECTORY
fi
# assemble expected release artifact name
BINARY="wasmer-${OS}-${ARCH}.tar.gz"