really wait for Drive to close

This commit is contained in:
Loic Nageleisen 2014-11-17 09:50:29 +01:00
parent a534392197
commit 385ed85dd3

View file

@ -70,8 +70,14 @@ def remove_persistent_assets
end end
def restart def restart
print "waiting for Google Drive to close..."
%x(killall "Google Drive") %x(killall "Google Drive")
sleep 30 while system("ps -u $(whoami) | grep -v grep | grep 'Google Drive.app' > /dev/null") do
sleep 1
print "."
end
puts
puts "restarting Google Drive..."
%x(open -a "Google Drive") %x(open -a "Google Drive")
end end