erplibre/script/addons/reinstall_addons.sh
Mathieu Benoit 5065dc2f2a [FIX] test new_project: use temp file for config
- All addons script support config
- script/repo_revert_git_diff_date_from_code_generator support multi repo
2022-02-10 00:53:59 -05:00

28 lines
705 B
Bash
Executable file

#!/usr/bin/env bash
# Argument 3 is config
if [[ $# -eq 3 ]]; then
./script/addons/check_addons_exist.py -m "$2" -c "$3"
else
./script/addons/check_addons_exist.py -m "$2"
fi
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error check_addons_exist.py into reinstall_addons_dev.sh"
exit 1
fi
if [[ $# -eq 3 ]]; then
./script/addons/uninstall_addons.sh "$1" "$2" "$3"
else
./script/addons/uninstall_addons.sh "$1" "$2"
fi
# Ignore if not uninstall
if [[ $# -eq 3 ]]; then
./script/addons/install_addons_dev.sh "$1" "$2" "$3"
else
./script/addons/install_addons_dev.sh "$1" "$2"
fi
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error install_addons_dev.sh into reinstall_addons.sh"
exit 1
fi