Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cloneAddons script; updated readme
- Loading branch information
1 parent
c1c9509
commit ed9cf84
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[@]}" |
Submodule ofxAppUtils
added at
e17045
Submodule ofxPd
added at
808c0e