File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,13 @@ echo "SRCPATH is $SRCPATH"
1919
2020i=0
2121
22- while true ; do
23- # Test whether running .vmx files are inside our path.
24- running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
22+ # Test whether running .vmx files are inside our path.
23+ running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
2524
25+ # Save this initial list of .vmx files
26+ vmxlist=$running
27+
28+ while true ; do
2629 echo " Current running VM list is $running "
2730
2831 # If no VMs are running, we can continue.
@@ -40,8 +43,16 @@ while true; do
4043 echo " Suspending $vmx "
4144 vmrun suspend " $vmx "
4245 done
46+
47+ # Refresh running VM list
48+ running=(${(@ f)" $( vmrun list | grep " $SRCPATH " ) " } )
4349done
4450
51+ # Test that every VMX in the list has no lockfile; otherwise quit Fusion
52+ if [false]; then
53+ osascript -e ' tell application "VMware Fusion to quit'
54+ fi
55+
4556# Create a compressed read-only .dmg. HFS+ seems to be smaller than APFS.
4657echo " Creating disk image"
4758hdiutil create -srcfolder " $1 " " $2 " -fs HFS+
You can’t perform that action at this time.
0 commit comments