Created
May 1, 2017 09:12
-
-
Save gentam/c61b2c63122884ce79876f70194e4598 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 | |
brew missing | awk 'BEGIN { print "Installing missing formulae..." } | |
{ | |
split($0, a) | |
for (i = 2; i <= NF; i++) { | |
dep = a[i] | |
if (!installed[dep]) { | |
print "\n------------------------------------------------------------" | |
print "Installing dependencies for " $1 | |
system("brew desc " dep) | |
system("brew install " dep) | |
installed[dep] = 1 | |
} | |
} | |
} | |
END { print "\nDone" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment