Skip to content

Instantly share code, notes, and snippets.

@1ec5
Created January 25, 2016 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ec5/a443ed62cbbc17a42db0 to your computer and use it in GitHub Desktop.
Save 1ec5/a443ed62cbbc17a42db0 to your computer and use it in GitHub Desktop.
CocoaPods pods by minimum deployment target
#!/usr/bin/bash
git clone https://github.com/CocoaPods/Specs.git
cd Specs/
for pod in `ls`; do
ver=$(ls $pod | sort -n | tail -n 1);
spec=$(ls $pod/$ver | head -n 1);
echo $pod/$ver/$spec >> ~/Desktop/specs.txt;
done
while read file; do
for ver in (0 1 2 3 4 5 6 7 8 9); do
grep -qE "ios['\"]:\s*['\"]$ver\." $file && echo $file >> ~/Desktop/specs$ver.txt;
done
done < ~/Desktop/specs.txt
find ~/Desktop/ -name specs?.txt -exec wc -l {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment