Created
December 6, 2017 16:51
-
-
Save gali8/dabf91f1b2df846b80f55d524dbec421 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#to print Build settings type on terminal: xcodebuild -project MyProject.xcodeproj -target "MyTarget" -showBuildSettings | |
#PROJECT_DIR = /Users/daniele/Desktop/MyProjectFolder | |
project_content_folder="MyProject" | |
storyboard_file="Main.storyboard" | |
storyboard_file_orig="Main_orig.storyboard" | |
storyboard_file_backup="Main_bk.storyboard" | |
storyboard_dir="${PROJECT_DIR}/${project_content_folder}/Base.lproj" | |
from_text="red=\"1\" green=\"0.14901960784313725\" blue=\"0.0\"" | |
to_text="red=\"0.0\" green=\"0.47843137250000001\" blue=\"1\"" | |
echo ${storyboard_dir} | |
cd ${storyboard_dir} | |
if [ -f ${storyboard_file} ] | |
then | |
cp ${storyboard_file} ${storyboard_file_backup} | |
mv ${storyboard_file} ${storyboard_file_orig} | |
fi | |
sed "s/${from_text}/${to_text}/g" ${storyboard_file_orig} > ${storyboard_file} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment