Last active
December 23, 2016 23:02
-
-
Save azimin/a8bdbbb470b616a5f52c35865c4753e5 to your computer and use it in GitHub Desktop.
Search file for "Header Search Paths"
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
property fileToSearch : "UCSongTrainerRenderingController.h" | |
property finalPath : "" | |
set finalPath to do shell script ("mdfind -name " & fileToSearch & " -onlyin /") | |
set finalPath to replace_chars(finalPath, "/Users/azimin/iOSDeveloper/Uberchord-iOS", "$(PROJECT_DIR)") | |
set finalPath to replace_chars(finalPath, "/" & fileToSearch, "") | |
set finalPath to replace_chars(finalPath, " ", "\\ ") | |
set the clipboard to finalPath | |
on replace_chars(this_text, search_string, replacement_string) | |
set AppleScript's text item delimiters to the search_string | |
set the item_list to every text item of this_text | |
set AppleScript's text item delimiters to the replacement_string | |
set this_text to the item_list as string | |
set AppleScript's text item delimiters to "" | |
return this_text | |
end replace_chars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment