Remove unnecessary exit_code test
This commit is contained in:
@@ -125,21 +125,16 @@ clone_repos() {
|
||||
|
||||
printf "\n%s\n" "Start cloning..."
|
||||
|
||||
for repo in $@; do
|
||||
for repo in ${@}; do
|
||||
if [[ -d "${oca_addons_install_path}/${repo}" ]]; then
|
||||
printf "${color_warning}%b${color_end},\n" "Repo ${repo} already exist! Skipped..."
|
||||
continue
|
||||
fi
|
||||
cd ${oca_addons_install_path} && git clone https://github.com/OCA/${repo}.git --branch ${odoo_version} --single-branch
|
||||
exit_code=$?
|
||||
if [[ "${exit_code}" -ne 0 ]]; then
|
||||
if [[ "${?}" -ne 0 ]]; then
|
||||
printf "${color_danger}%s${color_end},\n" "Error! Something was wrong cloning ${repo} repository..."
|
||||
fi
|
||||
done
|
||||
if [[ "${exit_code}" -ne 0 ]]; then
|
||||
printf "${color_danger}%s${color_end}\n" "Error! Something was wrong during the cloning process."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "\n${bold}%b${bold_end}\n" "Clone complete!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user