Skip to content

Instantly share code, notes, and snippets.

@willkill07
Created September 16, 2017 17:06
Show Gist options
  • Save willkill07/25078e1944eafe07d3dedb79f13822d5 to your computer and use it in GitHub Desktop.
Save willkill07/25078e1944eafe07d3dedb79f13822d5 to your computer and use it in GitHub Desktop.
high sierra compatibility
echo "type in a brew package name and press enter"
echo "to end your queries, send EOF (Ctrl+D)"
echo "> "
while read -r package
do
brew info $package | \
awk '/^From:/{
gsub(/github.com/,"raw.githubusercontent.com")
gsub(/\/blob\//,"/")
print $2
}' | \
xargs curl -s > tmp.txt
grep -c 'bottle :unneeded' tmp.txt > /dev/null
if [[ $? -eq 0 ]]
then
echo "bottle not needed";
else
grep -c ':high_sierra' tmp.txt > /dev/null
if [[ $? -eq 0 ]]
then
echo "high sierra supported"
else
echo "high sierra NOT supported"
fi
fi
echo "> "
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment