File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,20 @@ SRCPATH=$(cd "$1"; pwd)
1717
1818echo " SRCPATH is $SRCPATH "
1919
20- i=0
20+ running=()
2121
2222# Test whether running .vmx files are inside our path.
23- running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
23+ refresh_running () {
24+ running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
25+ }
26+
27+ refresh_running
2428
2529# Save this initial list of .vmx files
2630vmxlist=($running )
2731
32+ i=0
33+
2834while true ; do
2935 echo " Current running VM list is $running "
3036
@@ -44,8 +50,7 @@ while true; do
4450 vmrun suspend " $vmx "
4551 done
4652
47- # Refresh running VM list
48- running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
53+ refresh_running
4954done
5055
5156# Test that every VMX in the list has no lockfile; otherwise quit Fusion
You can’t perform that action at this time.
0 commit comments