From 3ba5c4be24a101a2fa6619c676bd23bfd7767b24 Mon Sep 17 00:00:00 2001 From: NikitaZotov Date: Mon, 31 Jul 2023 13:04:36 +0300 Subject: [PATCH] refactor: code indents in install_submodules.sh and prepare.sh --- scripts/install_submodules.sh | 16 +++++----------- scripts/prepare.sh | 6 +++--- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/scripts/install_submodules.sh b/scripts/install_submodules.sh index b56d9c54..7b102360 100755 --- a/scripts/install_submodules.sh +++ b/scripts/install_submodules.sh @@ -19,7 +19,7 @@ This script is used to download sources of ostis-web-platform and submodules and install them. The exact behavior is configured via run arguments. Options: - update: Remove ostis-web-platform submodules sources and download them from scratch. + --update: Remove ostis-web-platform submodules sources and download them from scratch. USAGE exit 1 } @@ -61,23 +61,17 @@ update=0 while [ "$1" != "" ]; do case $1 in - "update" ) + "--update" ) update=1 ;; - "--help" ) - usage - ;; - "help" ) - usage - ;; - "-h" ) + "--help" | "-h" ) usage ;; * ) usage ;; - esac - shift + esac + shift 1 done stage "Clone submodules" diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 98e993b1..e0529d73 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -57,7 +57,7 @@ prepare() echo -en "$1\n" } -if (( ${build_sc_machine} == 1 )); +if (( build_sc_machine == 1 )); then prepare "SC-machine" @@ -69,7 +69,7 @@ then fi -if (( ${build_sc_web} == 1 )); then +if (( build_sc_web == 1 )); then prepare "SC-web" "${SC_WEB_PATH}/scripts/install_deps_ubuntu.sh" @@ -77,7 +77,7 @@ if (( ${build_sc_web} == 1 )); then "${SC_WEB_PATH}/scripts/build_sc_web.sh" fi -if (( ${build_kb} == 1 )); then +if (( build_kb == 1 )); then stage "Build knowledge base" "${PLATFORM_PATH}/scripts/build_kb.sh" fi