From 45748c76ee2cf922bb26fb5fac6555370802ce59 Mon Sep 17 00:00:00 2001 From: f-galland Date: Thu, 17 Oct 2024 09:27:44 -0300 Subject: [PATCH] Putting the uncompressed directory into a variable --- build-scripts/assemble.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build-scripts/assemble.sh b/build-scripts/assemble.sh index ab4717e16443c..3f04bdbf59dfa 100644 --- a/build-scripts/assemble.sh +++ b/build-scripts/assemble.sh @@ -264,20 +264,21 @@ function clean() { # ==== function assemble_tar() { cd "${TMP_DIR}" - PATH_CONF="./config" - PATH_BIN="./bin" - PATH_PLUGINS="./plugins" # Extract echo "Extract ${ARTIFACT_BUILD_NAME} archive" tar -zvxf "${ARTIFACT_BUILD_NAME}" - cd "$(ls -d wazuh-indexer-*/)" + + decompressed_tar_dir=$(ls -d wazuh-indexer-*/) local version - version=$(cat VERSION) - - cd .. + version=$(cat ${decompressed_tar_dir}/VERSION) + + PATH_CONF="${decompressed_tar_dir}/config" + PATH_BIN="${decompressed_tar_dir}/bin" + PATH_PLUGINS="${decompressed_tar_dir}/plugins" + echo $(pwd) # Install plugins install_plugins "${version}" fix_log_rotation ${PATH_CONF}