From 2252f44c340eeeba4d34fef1d700a09d0e12f305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20-=20Le=20Filament?= <theo@le-filament.com> Date: Mon, 12 Aug 2024 17:18:27 +0200 Subject: [PATCH] build(get_addons): use environment variable for path to the cloned repository --- get_addons | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/get_addons b/get_addons index 6f5bb5b..87ad877 100644 --- a/get_addons +++ b/get_addons @@ -5,7 +5,7 @@ set -e ODOO_ROOT_DIR=${ODOO_ROOT_DIR:-'/opt/odoo'} SAVE_COMMITS_DIR=${SAVE_COMMITS_DIR:-'/opt/odoo_commits'} SAVE_COMMITS_FILENAME=${SAVE_COMMITS_FILENAME:-'custom_addons'} -TMP_REPO_PATH='/tmp/repo' +TMP_REPO_PATH=${TEMP_REPO_PATH:-'/tmp/repo'} save_commit() { repo="$1" @@ -37,13 +37,13 @@ fi set -e git -C "${TMP_REPO_PATH}" checkout "${ref}" -commit="$(git -C /tmp/repo rev-parse HEAD)" +commit="$(git -C ${TMP_REPO_PATH} rev-parse HEAD)" if [ -n "$modules" ]; then for module in $modules; do if [ -d "${ODOO_ROOT_DIR}/${dst}/${module}" ]; then rm -r "${ODOO_ROOT_DIR}/${dst}/${module}" fi - mv "/tmp/repo/${module}" "${ODOO_ROOT_DIR}/${dst}/" + mv "${TMP_REPO_PATH}/${module}" "${ODOO_ROOT_DIR}/${dst}/" save_commit "$repo" "$commit" "$module" "$dst" done else -- GitLab