summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-05 17:53:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-05 17:54:43 +0300
commit0628d73427b1f3461ecde5639e7b5ce8839dcbfb (patch)
treead852379d92cd1c099a0b14d5c154a5d881fd893
parent541a09360b35780ae599da84ef74621c599e702a (diff)
downloadevol-all-0628d73427b1f3461ecde5639e7b5ce8839dcbfb.tar.gz
evol-all-0628d73427b1f3461ecde5639e7b5ce8839dcbfb.tar.bz2
evol-all-0628d73427b1f3461ecde5639e7b5ce8839dcbfb.tar.xz
evol-all-0628d73427b1f3461ecde5639e7b5ce8839dcbfb.zip
Add ability to init.sh clone only task related repos.
Build in tasks: all client server music default Example: ./init.sh client
-rwxr-xr-xinit.sh28
1 files changed, 22 insertions, 6 deletions
diff --git a/init.sh b/init.sh
index 676facf..9e0e700 100755
--- a/init.sh
+++ b/init.sh
@@ -1,11 +1,27 @@
#!/bin/bash
-git clone git@gitorious.org:evol/clientdata.git client-data
-git clone git@gitorious.org:evol/hercules.git server-code
-git clone git@gitorious.org:evol/serverdata.git server-data
-git clone git@gitorious.org:evol/evol-tools.git tools
-git clone git@gitorious.org:evol/evol-hercules.git server-code/src/evol
+CMD="$1"
+if [[ -z "${CMD}" ]]; then
+ export CMD="default"
+fi
+
+if [[ "${CMD}" == "all" || "${CMD}" == "default" ]]; then
+ git clone git@gitorious.org:evol/clientdata.git client-data
+ git clone git@gitorious.org:evol/hercules.git server-code
+ git clone git@gitorious.org:evol/serverdata.git server-data
+ git clone git@gitorious.org:evol/evol-tools.git tools
+ git clone git@gitorious.org:evol/evol-hercules.git server-code/src/evol
+elif [[ "${CMD}" == "server" ]]; then
+ git clone git@gitorious.org:evol/hercules.git server-code
+ git clone git@gitorious.org:evol/serverdata.git server-data
+ git clone git@gitorious.org:evol/evol-hercules.git server-code/src/evol
+elif [[ "${CMD}" == "client" ]]; then
+ git clone git@gitorious.org:evol/clientdata.git client-data
+ git clone git@gitorious.org:evol/evol-tools.git tools
+elif [[ "${CMD}" == "music" ]]; then
+ git clone git@gitorious.org:evol/evol-music.git music
+fi
-if [[ "$1" == "all" ]]; then
+if [[ "${CMD}" == "all" ]]; then
git clone git@gitorious.org:evol/evol-music.git music
fi