Created
November 25, 2017 00:17
-
-
Save jeremydouglass/fb10c8390926baf81719810dd526cb10 to your computer and use it in GitHub Desktop.
Create a Processing(Java) blank sketch project in a new Git repository
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
#!/usr/bin/env bash | |
# | |
# Create a Processing(Java) blank sketch project in a new Git repository | |
# | |
# Usage: | |
# new_processing-java_sketch.sh SketchName | |
# create repo | |
mkdir $1 | |
cd $1 | |
git init | |
git commit --allow-empty -m "Initial commit" | |
git status | |
# create default gitignore | |
echo " | |
.DS_Store | |
applet | |
application.linux32 | |
application.linux64 | |
application.windows32 | |
application.windows64 | |
application.macosx | |
" >> .gitignore | |
git add .gitignore | |
git commit -m "add .gitignore defaults" | |
# create a blank Processing sketch with the same name | |
echo "/** | |
* Example Sketch | |
*/ | |
void setup(){ | |
} | |
void draw(){ | |
} | |
" >> $1.pde | |
git add $1.pde | |
git commit -m "blank Processing sketch" | |
# instructions on pushing to GitHub | |
echo "To sync to GitHub, create a repo $1, then:" | |
echo " git remote add origin https://github.com/YOURACCOUNT/$1.git" | |
echo " git push -u origin master" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment