Created
June 17, 2014 02:55
-
-
Save dsibiski/c7758c944697edd2065d to your computer and use it in GitHub Desktop.
Restore CocoaPods Symlinks
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
# Description: Restores symlinks that were lost due to Windows or Linux machines processing the | |
# project files. | |
# | |
# Problem explained here: http://www.egeek.me/2013/01/26/note-about-building-cocoapods-powered-ios-projects/ | |
# | |
# Installation: Place this script as a new 'Run Script Build Phase' for your Target (preferably | |
# right after 'Target Dependencies') | |
for base_dir in "${SRCROOT}/Pods/Headers" "${SRCROOT}/Pods/BuildHeaders" | |
do | |
for directory in $(find $base_dir -type d) | |
do | |
echo "Looking to convert symlinks: $directory" | |
files=`find $directory/* -maxdepth 1 -type f` | |
for file in $files | |
do | |
echo "Convert to symlink: $file" | |
path_to_original=`cat $file` | |
`ln -s -f $path_to_original $file` | |
done | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment