-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm-bin-magento
executable file
·23 lines (17 loc) · 884 Bytes
/
m-bin-magento
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
set -e
cd "$(dirname "${BASH_SOURCE[0]}")" && devbox_dir=$PWD
source "${devbox_dir}/scripts/functions.sh"
resetNestingLevel
current_script_name=`basename "$0"`
initLogFile ${current_script_name}
debug_devbox_project="$(bash "${devbox_dir}/scripts/get_config_value.sh" "debug_devbox_project")"
if [[ ${debug_devbox_project} -eq 1 ]]; then
set -x
fi
arguments=$@
cd "${devbox_dir}"
executeInMagento2Container php -- "${devbox_dir}/magento/bin/magento" ${arguments} 2> >(logError)
# To debug, comment out line above and uncomment line below
# devbox ssh -c "php -d xdebug.remote_autostart=1 \$MAGENTO_ROOT/bin/magento $arguments" 2> >(logError)
info "$(regular)See details in $(bold)${devbox_dir}/log/${current_script_name}.log$(regular). For debug output set $(bold)debug:devbox_project$(regular) to $(bold)1$(regular) in $(bold)etc/config.yaml$(regular)"