Last active
July 11, 2016 21:34
-
-
Save marcelofabri/5480591 to your computer and use it in GitHub Desktop.
Open .xcworkspace file if exists or .xcodeproj otherwise. Useful for CocoaPods users. Found it elsewhere, but I can't find it anymore.
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 ruby | |
require 'shellwords' | |
proj = Dir['*.xcworkspace'].first | |
proj = Dir['*.xcodeproj'].first unless proj | |
if proj | |
puts "Opening #{proj}" | |
`open #{proj}` | |
else | |
puts "No xcworkspace|xcproj file found" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is currently under paulomendes/xopen.