summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-14 14:46:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-14 14:46:46 +0300
commit4a5cb2a25f32e195dcfe56a3038f056551d2fc81 (patch)
treed8daf4c5242233e3e33bddda906bcedf82994819
parent0bbdf8b22f39dd06e3e61167d304c77711060f32 (diff)
downloadall-4a5cb2a25f32e195dcfe56a3038f056551d2fc81.tar.gz
all-4a5cb2a25f32e195dcfe56a3038f056551d2fc81.tar.bz2
all-4a5cb2a25f32e195dcfe56a3038f056551d2fc81.tar.xz
all-4a5cb2a25f32e195dcfe56a3038f056551d2fc81.zip
Allow add child repos with current protocol and not always git@.
-rwxr-xr-xinit.sh49
1 files changed, 28 insertions, 21 deletions
diff --git a/init.sh b/init.sh
index 35ac93b..4571ec5 100755
--- a/init.sh
+++ b/init.sh
@@ -1,42 +1,49 @@
#!/bin/bash
CMD="$1"
+PROTO="git@gitorious.org:"
if [[ -z "${CMD}" ]]; then
export CMD="default"
fi
+STR=`git remote -v|grep "https://"`
+if [[ -n "${STR}" ]]; then
+ export PROTO="https://gitorious.org/"
+fi
+exit
+
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
- git clone git@gitorious.org:evol/evol-local.git server-local
+ git clone ${PROTO}evol/clientdata.git client-data
+ git clone ${PROTO}evol/hercules.git server-code
+ git clone ${PROTO}evol/serverdata.git server-data
+ git clone ${PROTO}evol/evol-tools.git tools
+ git clone ${PROTO}evol/evol-hercules.git server-code/src/evol
+ git clone ${PROTO}evol/evol-local.git server-local
ln -s server-code/src/evol server-plugin
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
+ git clone ${PROTO}evol/hercules.git server-code
+ git clone ${PROTO}evol/serverdata.git server-data
+ git clone ${PROTO}evol/evol-hercules.git server-code/src/evol
ln -s server-code/src/evol server-plugin
elif [[ "${CMD}" == "client" ]]; then
- git clone git@gitorious.org:evol/clientdata.git client-data
- git clone git@gitorious.org:evol/evol-tools.git tools
+ git clone ${PROTO}evol/clientdata.git client-data
+ git clone ${PROTO}evol/evol-tools.git tools
elif [[ "${CMD}" == "music" ]]; then
- git clone git@gitorious.org:evol/evol-music.git music
+ git clone ${PROTO}evol/evol-music.git music
elif [[ "${CMD}" == "local" ]]; then
- git clone git@gitorious.org:evol/evol-local.git server-local
- 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
- git clone git@gitorious.org:evol/evol-tools.git tools
+ git clone ${PROTO}evol/evol-local.git server-local
+ git clone ${PROTO}evol/hercules.git server-code
+ git clone ${PROTO}evol/serverdata.git server-data
+ git clone ${PROTO}evol/evol-hercules.git server-code/src/evol
+ git clone ${PROTO}evol/evol-tools.git tools
ln -s server-code/src/evol server-plugin
elif [[ "${CMD}" == "tools" ]]; then
- git clone git@gitorious.org:evol/evol-tools.git tools
+ git clone ${PROTO}evol/evol-tools.git tools
elif [[ "${CMD}" == "manaplus" ]]; then
- git clone git@gitorious.org:manaplus/manaplus.git manaplus
+ git clone ${PROTO}manaplus/manaplus.git manaplus
fi
if [[ "${CMD}" == "all" ]]; then
- git clone git@gitorious.org:evol/evol-music.git music
- git clone git@gitorious.org:manaplus/manaplus.git manaplus
+ git clone ${PROTO}evol/evol-music.git music
+ git clone ${PROTO}manaplus/manaplus.git manaplus
fi