Skip to content

Commit 38a4513

Browse files
committed
figured out algorithm for testing for lockfiles
need to test this! Probably going to need to mock osascript too
1 parent 48c86f7 commit 38a4513

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

archive_fusionvm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ while true; do
4949
done
5050

5151
# 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
52+
for vmx in $vmxlist; do
53+
if [ -f "$vmx.lck" ]; then
54+
osascript -e 'tell application "VMware Fusion" to quit'
55+
break
56+
fi
57+
done
5558

5659
# Create a compressed read-only .dmg. HFS+ seems to be smaller than APFS.
5760
echo "Creating disk image"

0 commit comments

Comments
 (0)