diff --git a/neon/build.sh b/neon/build.sh index 19c59a84fafd06d3a82cc3293aa8dcc981ef1577..a67b9e5968d294b70c0d17742027ed20350f6c34 100755 --- a/neon/build.sh +++ b/neon/build.sh @@ -1,11 +1,7 @@ #!/bin/sh -cd neon - -if [ -z "${DUNITER_FAST_BUILD}" ] -then - if [ -e "${HOME}/.cargo/bin/rustup" ] - then +if [ -z "${DUNITER_FAST_BUILD}" ]; then + if [ -e "${HOME}/.cargo/bin/rustup" ]; then rustup update stable else curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y @@ -19,11 +15,10 @@ else echo "WARNING: you have disabled the automatic update of Rust, remember to update Rust regularly with command \"rustup update\"." fi -if [ "${NEON_BUILD_RELEASE}" = "true" ] || [ "${NODE_ENV}" = "production" ] -then - neon build --release +cd neon + +if [ "${NEON_BUILD_RELEASE}" = "true" ] || [ "${NODE_ENV}" = "production" ]; then + neon build --release else neon build fi - -cd .. \ No newline at end of file