From a9b099f715b7555ae7696befecf6545abe6a498d Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Mon, 15 Jun 2020 17:46:03 +0200
Subject: [PATCH] [build] Change neon/build.sh script

Move 'then' keywords after the condition for better readability
Remove useless directory change at the end of the script
Move "cd neon" close to the related build calls
---
 neon/build.sh | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/neon/build.sh b/neon/build.sh
index 19c59a84f..a67b9e596 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
-- 
GitLab