Created
April 26, 2015 11:19
-
-
Save VessoVit/ee586474604972f4df07 to your computer and use it in GitHub Desktop.
Build All Examples OpenFrameworks (OSx)
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
#!/bin/bash | |
for category in $( find ../../examples -maxdepth 1 -type d ) | |
do | |
if [ "$category" = "../../examples/android" -o "$category" = "../../examples/ios" -o "$category" = "../../examples" ]; then | |
continue | |
fi | |
echo "-----------------------------------------------------------------" | |
echo building ALL examples in $category | |
for example in $( find $category -maxdepth 1 -type d ) | |
do | |
if [ "$example" = "$category" ]; then | |
continue | |
fi | |
echo "Copying default make to " $example | |
echo "------------------------" | |
cp -n template/Makefile $example | |
cp -n template/config.make $example | |
echo "------------------------" | |
echo "building " + $example | |
#projectGenerator . | |
make Debug -j3 -C $example | |
if [ ! -e "$example"/$(basename $example).xcodeproj ]; then | |
echo "-----------------------------------------------------------------" | |
echo no xcode project for $example | |
continue | |
fi | |
echo "-----------------------------------------------------------------" | |
echo building $example Debug | |
xcodebuild -configuration Debug -target $(basename $example) -project $example/$(basename $example).xcodeproj | |
ret=$? | |
if [ $ret -ne 0 ]; then | |
echo failed building $example Debug | |
exit | |
fi | |
echo "-----------------------------------------------------------------" | |
echo building $example Release | |
xcodebuild -configuration Release -target $(basename $example) -project $example/$(basename $example).xcodeproj | |
ret=$? | |
if [ $ret -ne 0 ]; then | |
echo failed building $example Release | |
exit | |
fi | |
echo "-----------------------------------------------------------------" | |
echo "" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment