Skip to content

Commit

Permalink
added cloneAddons script; updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danomatika committed Jan 24, 2012
1 parent c1c9509 commit ed9cf84
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.markdown
Expand Up @@ -16,6 +16,15 @@ A port of Chris McCormick's Android [PdDroidParty](http://mccormick.cx/projects/

NOTE: THIS IS CURRENTLY IN AN ALPHA STAGE AND LIKELY NOT TO WORK JUST YET ... STAY TUNED.

INSTALLATION & BUILDING
-----------------------

Run the `cloneAddons` script in the scripts folder to install the addon dependencies:
* ofxPd
* ofxAppUtils

Currently, only Xcode projects are provided for MacOS and iOS.

DEVELOPING
----------

Expand Down
52 changes: 52 additions & 0 deletions scripts/cloneAddons
@@ -0,0 +1,52 @@
#! /bin/bash
#
# clone all needed addons
#
# 2012 Dan Wilcox danomatika.com
#
# references:
# http://www.cyberciti.biz/faq/bash-for-loop-array/
# http://tldp.org/LDP/abs/html/complexfunct.html
# http://stackoverflow.com/questions/1063347/passing-arrays-as-parameters-in-bash
#

### variables

WD=$(dirname $0)
ADDONS_DIR="../../../addons"

# addons
danomatika_addons=(
"ofxPd"
"ofxAppUtils"
)

### functions

# clone a list of addons form Github
# $1 - Github user name
# $2 - array of addon repo names
function cloneAddons {
local user=$1
local array=("$@")

# load array from argument
for (( i = 1 ; i < ${#array[@]} ; i++ )) ; do
printf "${format}" $i "${array[$i]}"
done

# clone
for i in "${array[@]}" ; do
git clone git://github.com/$user/$i.git
done
return
}

### do stuff

cd $WD
cd $ADDONS_DIR

# clone those addons

cloneAddons danomatika "${danomatika_addons[@]}"
1 change: 1 addition & 0 deletions scripts/ofxAppUtils
Submodule ofxAppUtils added at e17045
1 change: 1 addition & 0 deletions scripts/ofxPd
Submodule ofxPd added at 808c0e

0 comments on commit ed9cf84

Please sign in to comment.