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
34
34
sed -i.back " s|forwarded_ssh_port: 3000|forwarded_ssh_port: ${forwarded_ssh_port} |g" " ${config_path} "
35
35
rm -f " ${config_path} .back"
36
36
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.
38
38
force_project_cleaning=0
39
- while getopts ' f' flag; do
39
+ force_codebase_cleaning=0
40
+ while getopts ' fc' flag; do
40
41
case " ${flag} " in
41
42
f) force_project_cleaning=1 ;;
43
+ c) force_codebase_cleaning=1 ;;
42
44
* ) error " Unexpected option ${flag} " ;;
43
45
esac
44
46
done
45
47
if [ ${force_project_cleaning} -eq 1 ]; then
46
48
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
48
53
fi
49
54
50
55
if [ ! -d ${magento_ce_dir} ]; then
You can’t perform that action at this time.
0 commit comments