forked from labatrockwell/openTSPS
-
Notifications
You must be signed in to change notification settings - Fork 2
/
clone_addons.sh
executable file
·40 lines (33 loc) · 1.28 KB
/
clone_addons.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Dependencies for project
cd ../../../addons/
addons=( 'emmanuelgeoffray/ofxLabGui.git' 'kylemcdonald/ofxCv.git' 'emmanuelgeoffray/ofxLibwebsockets.git' 'memo/ofxMSAInteractiveObject.git' 'emmanuelgeoffray/ofxNI2.git' 'emmanuelgeoffray/ofxOpenCVExtensions.git' 'emmanuelgeoffray/ofxOpenNI.git' 'Spacebrew/ofxSpacebrew.git' 'astellato/ofxSyphon.git' 'emmanuelgeoffray/ofxTSPS.git' 'labatrockwell/ofxTSPSReceiver.git' 'emmanuelgeoffray/ofxTuioWrapper.git' 'bakercp/ofxIO.git' 'bakercp/ofxMediaType.git' 'bakercp/ofxSSLManager.git' 'bakercp/ofxTaskQueue.git' 'emmanuelgeoffray/ofxNetworkUtils.git' 'bakercp/ofxHTTP.git' 'bakercp/ofxIpVideoGrabber.git')
if [ -z $1 ]; then
PREFIX="git clone https://github.com/"
else
PREFIX="git clone [email protected]:"
fi
installOrUpdate(){
DIRECTORY=`basename $1/`
DIRECTORY="${DIRECTORY%.*}"
if [[ -d "${DIRECTORY}" && ! -L "${DIRECTORY}" ]] ; then
echo "Repo $DIRECTORY already exist, we should update it...\n\r updating..."
cd $DIRECTORY
git pull
git status
git submodule sync
git submodule update
git submodule status
cd -
echo "$DIRECTORY updated\n\r"
else
${PREFIX}$1 $2 $3
fi
}
installAll(){
for i in "${addons[@]}"
do
installOrUpdate $i
done
}
installAll