Skip to content

Instantly share code, notes, and snippets.

@jeremydouglass
Created November 25, 2017 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremydouglass/fb10c8390926baf81719810dd526cb10 to your computer and use it in GitHub Desktop.
Save jeremydouglass/fb10c8390926baf81719810dd526cb10 to your computer and use it in GitHub Desktop.
Create a Processing(Java) blank sketch project in a new Git repository
#!/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