forked from paliarush/magento2-vagrant-for-developers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm-bin-magento
executable file
·23 lines (17 loc) · 873 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]}")" && vagrant_dir=$PWD
source "${vagrant_dir}/scripts/output_functions.sh"
resetNestingLevel
current_script_name=`basename "$0"`
initLogFile ${current_script_name}
debug_vagrant_project="$(bash "${vagrant_dir}/scripts/get_config_value.sh" "debug_vagrant_project")"
if [[ ${debug_vagrant_project} -eq 1 ]]; then
set -x
fi
arguments=$@
cd "${vagrant_dir}"
vagrant ssh -c "\$MAGENTO_ROOT/bin/magento $arguments" 2> >(logError)
# To debug, comment out line above and uncomment line below
# vagrant ssh -c "php -d xdebug.remote_autostart=1 \$MAGENTO_ROOT/bin/magento $arguments" 2> >(logError)
info "$(regular)See details in $(bold)${vagrant_dir}/log/${current_script_name}.log$(regular). For debug output set $(bold)debug:vagrant_project$(regular) to $(bold)1$(regular) in $(bold)etc/config.yaml$(regular)"