erplibre/script/addons/install_addons.sh

30 lines
705 B
Bash
Raw Permalink Normal View History

2021-06-27 00:22:22 -04:00
#!/usr/bin/env bash
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
# 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 -e "${Red}Error${Color_Off} check_addons_exist.py into install_addons.sh"
exit 1
fi
echo "Install module '$2' on BD '$1'"
if [[ $# -eq 3 ]]; then
./run.sh --no-http --stop-after-init -d "$1" -i "$2" -u "$2" -c "$3"
else
./run.sh --no-http --stop-after-init -d "$1" -i "$2" -u "$2"
fi
2021-06-27 00:22:22 -04:00
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo -e "${Red}Error${Color_Off} run.sh into install_addons.sh"
exit 1
2021-06-27 00:22:22 -04:00
fi