File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -34,17 +34,22 @@ sed -i.back "s|host_name: \"magento2.vagrant2\"|host_name: \"magento2.vagrant${r
3434sed -i.back " s|forwarded_ssh_port: 3000|forwarded_ssh_port: ${forwarded_ssh_port} |g" " ${config_path} "
3535rm -f " ${config_path} .back"
3636
37- # Clean up the project before initialization if "-f" option was specified
37+ # Clean up the project before initialization if "-f" option was specified. Remove codebase if "-fc" is used.
3838force_project_cleaning=0
39- while getopts ' f' flag; do
39+ force_codebase_cleaning=0
40+ while getopts ' fc' flag; do
4041 case " ${flag} " in
4142 f) force_project_cleaning=1 ;;
43+ c) force_codebase_cleaning=1 ;;
4244 * ) error " Unexpected option ${flag} " ;;
4345 esac
4446done
4547if [ ${force_project_cleaning} -eq 1 ]; then
4648 vagrant destroy -f
47- rm -rf ${magento_ce_dir} ${vagrant_dir} /.idea ${vagrant_dir} /.vagrant
49+ rm -rf ${vagrant_dir} /.idea ${vagrant_dir} /.vagrant
50+ if [ ${force_codebase_cleaning} -eq 1 ]; then
51+ rm -rf ${magento_ce_dir}
52+ fi
4853fi
4954
5055if [ ! -d ${magento_ce_dir} ]; then
You can’t perform that action at this time.
0 commit comments