Created
July 26, 2017 14:37
-
-
Save lewang/9db6b4836c8e358d677d5d4aa9919ef5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash -x | |
function getUsage() | |
{ | |
echo $(ps -A -o "%cpu command" | grep com.docker.hyperkit | grep -v grep | head -1 | cut -f1 -d.) | |
} | |
while [ $(getUsage) -gt 50 ]; do | |
sleep 3 | |
done | |
say "docker is done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment