Last active
August 29, 2015 14:08
-
-
Save mattfelsen/b50762ed68a9e43f7388 to your computer and use it in GitHub Desktop.
Local Projects openFrameworks New Project Setup
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
| #!/bin/bash | |
| # | |
| # usage: | |
| # ./setup.sh ProjectName http://server/path/to/new/project/repo.git | |
| # | |
| # do some checking on $1 and $2 to see if they're empty, whether $1 is a | |
| # URL and we're already inside the project dir, etc. | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| # create the project folder, move in, make a git repo | |
| mkdir $1 | |
| cd $1 | |
| git init | |
| # change origin remote to point at new project repo | |
| git remote add origin $2 | |
| # make the folder structure | |
| mkdir Apps | |
| mkdir Configs | |
| mkdir Deployment | |
| mkdir Deployment/Scripts | |
| mkdir Documentation | |
| mkdir ExternalAddons | |
| mkdir Scripts | |
| mkdir Sketches | |
| # create stubs for scripts | |
| touch build.command | |
| touch Scripts/start.command | |
| touch Scripts/stop.command | |
| # create stub for readme | |
| touch README.md | |
| # openFrameworks | |
| # - add as submodule | |
| # - switch to the stable branch | |
| # - stage the submodule's commit to the stable branch instead of master | |
| git submodule add https://github.com/local-projects/openFrameworks.git | |
| cd openFrameworks | |
| git checkout stable | |
| cd .. | |
| git add openFrameworks | |
| # openFrameworks projectGenerator | |
| # - build the projectGenerator | |
| # - set the projectGenerator OF root to our newly cloned OF repo | |
| # - create your first app! | |
| cd openFrameworks/apps/devApps/projectGenerator/ | |
| xcodebuild | |
| echo $DIR/$1/openFrameworks > ~/.ofprojectgenerator/config | |
| ./bin/emptyExample.app/Contents/MacOS/emptyExample | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment